all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Wagner <l.wagner@proxmox.com>
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	[thread overview]
Message-ID: <20260529133951.326103-7-l.wagner@proxmox.com> (raw)
In-Reply-To: <20260529133951.326103-1-l.wagner@proxmox.com>

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 <l.wagner@proxmox.com>
---
 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





      parent reply	other threads:[~2026-05-29 13:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29 13:39 [PATCH datacenter-manager 0/6] fix #7639: task cache: consider running tasks when updating the cutoff timestamp Lukas Wagner
2026-05-29 13:39 ` [PATCH datacenter-manager 1/6] pdm-api-types: add NativeUpid::node() convenience getter Lukas Wagner
2026-05-29 13:39 ` [PATCH datacenter-manager 2/6] task cache: tests: allow to provide an explicit end time in 'task' helper Lukas Wagner
2026-05-29 13:39 ` [PATCH datacenter-manager 3/6] task cache: tests: add get_cutoff helper Lukas Wagner
2026-05-29 13:39 ` [PATCH datacenter-manager 4/6] task cache: tests: add 'make_cache' convenience helper Lukas Wagner
2026-05-29 13:39 ` [PATCH datacenter-manager 5/6] fix #7639: task cache: consider running tasks when updating the cutoff timestamp Lukas Wagner
2026-05-29 13:39 ` Lukas Wagner [this message]

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=20260529133951.326103-7-l.wagner@proxmox.com \
    --to=l.wagner@proxmox.com \
    --cc=pdm-devel@lists.proxmox.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal