From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 5488E1FF14C for ; Fri, 29 May 2026 15:40:28 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 322CCC6AC; Fri, 29 May 2026 15:40:28 +0200 (CEST) From: Lukas Wagner To: pdm-devel@lists.proxmox.com Subject: [PATCH datacenter-manager 6/6] task cache: poll known active tasks every 30 seconds Date: Fri, 29 May 2026 15:39:51 +0200 Message-ID: <20260529133951.326103-7-l.wagner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260529133951.326103-1-l.wagner@proxmox.com> References: <20260529133951.326103-1-l.wagner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1780061964966 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.053 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: JHFXG2LITCSCCMYDWBML2SVX56WU33RO X-Message-ID-Hash: JHFXG2LITCSCCMYDWBML2SVX56WU33RO X-MailFrom: l.wagner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Since we now have to fetch active tasks anyway to avoid gaps in the task archive, we might as well lower the polling interval for any known active tasks to a smaller interval of 30 seconds. This should be a nice compromise between avoid too many requests and realtime-ness. The general polling interval for active and archived tasks is still set to 10 minutes, meaning any task that starts and finishes between polls is not actively polled. These would simply appear as 'finished' when the next 10 minute poll is done. Only tasks that are active when this regular poll happens are affected; the lower polling interval mainly ensures that any active task does not appear stuck until the next regular poll happens. Tasks that were started by PDM, so called 'tracked tasks', continue to be polled every 10 seconds. These have arguably stricter requirements to perceived responsiveness. Signed-off-by: Lukas Wagner --- server/src/remote_tasks/refresh_task.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/remote_tasks/refresh_task.rs b/server/src/remote_tasks/refresh_task.rs index c3b005ce..632b7d52 100644 --- a/server/src/remote_tasks/refresh_task.rs +++ b/server/src/remote_tasks/refresh_task.rs @@ -28,7 +28,7 @@ const TASK_FETCH_INTERVAL: Duration = Duration::from_secs(600); // NOTE: Since we at the moment never query active tasks from remotes, this is merely a safeguard // to clear stuck active tasks from a previous bug. If we at some point query active tasks, we // might lower this interval. -const POLL_ACTIVE_INTERVAL: Duration = Duration::from_secs(600); +const POLL_ACTIVE_INTERVAL: Duration = Duration::from_secs(30); /// Interval at which to check for task cache rotation. const CHECK_ROTATE_INTERVAL: Duration = Duration::from_secs(3600); -- 2.47.3