From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id A21B76EC5D; Fri, 2 Apr 2021 18:00:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A21B76EC5D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1617375622; bh=M21e4xAAuaOquLNSFndMpg65v7Rqph+276mjq41vGx8=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=YQ7XxbGC8LxKDFn+DDpdXOovyZCTbVZ+Ylf1hey7rOcqQIcMGI6icK/Z37yWn0bo2 sISOQXwTOT3CtH1ZDzZlg/RBbywZd2+jZqwgf8O7igpWrSBS0ypXWKy8RpnT+Aa2Kw 3AdIL1iFcoVdQIpqZnlZRLOj/YwNL6UP0Um3p+Fs= Received: from smtp47.i.mail.ru (smtp47.i.mail.ru [94.100.177.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id DFD436EC60 for ; Fri, 2 Apr 2021 17:58:24 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DFD436EC60 Received: by smtp47.i.mail.ru with esmtpa (envelope-from ) id 1lSLFg-0006jR-0S; Fri, 02 Apr 2021 17:58:24 +0300 To: v.shpilevoy@tarantool.org, alexander.turenko@tarantool.org Date: Fri, 2 Apr 2021 17:58:03 +0300 Message-Id: <44f4b260e0ac435fe78282c1f6f4607159914935.1617375300.git.sergepetrenko@tarantool.org> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9ED7173E37F4E32947A0146560F8BA709498CFB6209D8582A182A05F538085040EC6B3DE9FB78212E808A5F06CEDE4600B59468A17F0E59111DFFE48FC2960DF3 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE795530B80AF2ADB7BEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637188F5654332B449D8638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95C7B5A45DDF210A4CF381829D75DDC95D6842D30B4685CCEEBA471835C12D1D9774AD6D5ED66289B5278DA827A17800CE75A31C54DA8CF07A79FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C33B72D73EA5828B68117882F4460429728AD0CFFFB425014E868A13BD56FB6657D81D268191BDAD3DC09775C1D3CA48CF219A3F92F1D79E61BA3038C0950A5D36C8A9BA7A39EFB766EC990983EF5C0329BA3038C0950A5D36D5E8D9A59859A8B6EDF998CB16CCEE6976E601842F6C81A1F004C906525384307823802FF610243DF43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7CDDB9BF3B882869D543847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C7B5A45DDF210A4CF381829D75DDC95D6842D30B4685CCEEB9C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EF0417BEADF48D1460699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3442AF01057B6BF997ED23F3DBCA5AC421427595141FDD91850E053BFCCFC0A8ED9560BAD41B6971351D7E09C32AA3244CC8645F080EC623A64BC73EEC3D4C418CFE8DA44ABE2443F7927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbL9S8ysBdXhDmqlpxPgE90Bmq06AhY5R X-Mailru-Sender: 583F1D7ACE8F49BDD2846D59FC20E9F81968ACF4E54473F8A2506344900690413120E6DF4C99E0C9424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: [Tarantool-patches] [PATCH 4/4] feedback_daemon: generate report right before sending X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Serge Petrenko via Tarantool-patches Reply-To: Serge Petrenko Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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. Follow-up #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 2ce768642..0aab189b6 100644 --- a/src/box/lua/feedback_daemon.lua +++ b/src/box/lua/feedback_daemon.lua @@ -327,12 +327,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 pcall(http.post, self.host, json.encode(feedback), {timeout=1}) end end -- 2.24.3 (Apple Git-128)