* [pdm-devel] [PATCH datacenter-manager] remote tasks: correctly filter out foreign running PBS tasks
@ 2025-11-17 15:35 Lukas Wagner
0 siblings, 0 replies; only message in thread
From: Lukas Wagner @ 2025-11-17 15:35 UTC (permalink / raw)
To: pdm-devel
At the moment, only tasks started by PDM will ever show up as 'active' -
mostly to avoid having to regularly poll foreign (as in, not started by
PDM) tasks. If we included running tasks in the task cache, they could
appear as 'stuck' for up to one poll interval, even if they ran only for
a couple of seconds.
This commit fixes a mistake when checking whether the task is still
running or not. Before, we *only* included running tasks, which is the
opposite of what we want.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
server/src/bin/proxmox-datacenter-api/tasks/remote_tasks.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/src/bin/proxmox-datacenter-api/tasks/remote_tasks.rs b/server/src/bin/proxmox-datacenter-api/tasks/remote_tasks.rs
index 92f0f241..d3c8395e 100644
--- a/server/src/bin/proxmox-datacenter-api/tasks/remote_tasks.rs
+++ b/server/src/bin/proxmox-datacenter-api/tasks/remote_tasks.rs
@@ -301,7 +301,7 @@ async fn fetch_tasks_from_single_node(
.await?
.into_iter()
.filter_map(|task| {
- if task.endtime.is_none() {
+ if task.endtime.is_some() {
// We only care about finished tasks.
Some(map_pbs_task(task, remote.id.clone()))
} else {
--
2.47.3
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-11-17 15:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-17 15:35 [pdm-devel] [PATCH datacenter-manager] remote tasks: correctly filter out foreign running PBS tasks Lukas Wagner
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.