[Tarantool-patches] [PATCH v2 4/5] feedback_daemon: generate report right before sending

Serge Petrenko sergepetrenko at tarantool.org
Thu Apr 8 16:38:40 MSK 2021


Feedback daemon used to generate report before waiting (for an hour by
default) until it's time to send it. Better actualize the reports and
generate them right when it's time to send them.

Part of #5750
---
 src/box/lua/feedback_daemon.lua | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/box/lua/feedback_daemon.lua b/src/box/lua/feedback_daemon.lua
index 43bbc1fa2..93bbb2a11 100644
--- a/src/box/lua/feedback_daemon.lua
+++ b/src/box/lua/feedback_daemon.lua
@@ -333,12 +333,13 @@ local function feedback_loop(self)
     fiber.name(PREFIX, { truncate = true })
 
     while true do
-        local feedback = self:generate_feedback()
         local msg = self.control:get(self.interval)
         -- if msg == "send" then we simply send feedback
         if msg == "stop" then
             break
-        elseif feedback ~= nil then
+        end
+        local feedback = self:generate_feedback()
+        if feedback ~= nil then
             if is_first_send then
                 fiber.sleep(10)
                 is_first_send = nil
-- 
2.24.3 (Apple Git-128)



More information about the Tarantool-patches mailing list