Tarantool development patches archive
 help / color / mirror / Atom feed
From: Serge Petrenko via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
	alexander.turenko@tarantool.org
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v2 4/5] feedback_daemon: generate report right before sending
Date: Sat, 10 Apr 2021 18:03:47 +0300	[thread overview]
Message-ID: <53d1d30d-713a-bd3f-c5e3-a2cf16e90e95@tarantool.org> (raw)
In-Reply-To: <dc12a487-84fc-6487-0cf3-ed3fdaf63caa@tarantool.org>



10.04.2021 00:53, Vladislav Shpilevoy пишет:
> Thanks for the patch!
>
> On 08.04.2021 15:38, Serge Petrenko via Tarantool-patches wrote:
>> 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.
> Now there is the 10 seconds delay for the first send. Maybe worth
> generating the feedback after the sleep on Mac.
Sure, thanks for noticing!

Incremental diff:
=====================================

diff --git a/src/box/lua/feedback_daemon.lua 
b/src/box/lua/feedback_daemon.lua
index 93bbb2a11..64460f5f4 100644
--- a/src/box/lua/feedback_daemon.lua
+++ b/src/box/lua/feedback_daemon.lua
@@ -338,12 +338,12 @@ local function feedback_loop(self)
          if msg == "stop" then
              break
          end
+        if is_first_send then
+            fiber.sleep(10)
+            is_first_send = nil
+        end
          local feedback = self:generate_feedback()
          if feedback ~= nil then
-            if is_first_send then
-                fiber.sleep(10)
-                is_first_send = nil
-            end
              pcall(http.post, self.host, json.encode(feedback), 
{timeout=1})
          end
      end

-- 
Serge Petrenko


  reply	other threads:[~2021-04-10 15:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08 13:38 [Tarantool-patches] [PATCH v2 0/5] send feedback on start and on key events Serge Petrenko via Tarantool-patches
2021-04-08 13:38 ` [Tarantool-patches] [PATCH v2 1/5] feedback_daemon: include server uptime in the report Serge Petrenko via Tarantool-patches
2021-04-08 13:38 ` [Tarantool-patches] [PATCH v2 2/5] feedback_daemon: rename `send_test` to `send` Serge Petrenko via Tarantool-patches
2021-04-08 13:38 ` [Tarantool-patches] [PATCH v2 3/5] feedback_daemon: send feedback on server start Serge Petrenko via Tarantool-patches
2021-04-09 21:53   ` Vladislav Shpilevoy via Tarantool-patches
2021-04-10 15:03     ` Serge Petrenko via Tarantool-patches
2021-04-08 13:38 ` [Tarantool-patches] [PATCH v2 4/5] feedback_daemon: generate report right before sending Serge Petrenko via Tarantool-patches
2021-04-09 21:53   ` Vladislav Shpilevoy via Tarantool-patches
2021-04-10 15:03     ` Serge Petrenko via Tarantool-patches [this message]
2021-04-08 13:38 ` [Tarantool-patches] [PATCH v2 5/5] feedback_daemon: count and report some events Serge Petrenko via Tarantool-patches
2021-04-13  8:31   ` Alexander Turenko via Tarantool-patches
2021-04-13 10:38     ` Serge Petrenko via Tarantool-patches
2021-04-11 14:15 ` [Tarantool-patches] [PATCH v2 0/5] send feedback on start and on key events Vladislav Shpilevoy via Tarantool-patches
2021-04-12  6:04   ` Kirill Yukhin via Tarantool-patches
2021-04-13  9:44     ` Alexander Turenko via Tarantool-patches
2021-04-12  6:05 ` Kirill Yukhin via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53d1d30d-713a-bd3f-c5e3-a2cf16e90e95@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=sergepetrenko@tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v2 4/5] feedback_daemon: generate report right before sending' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox