[pdm-devel] [PATCH datacenter-manager] remote tasks: correctly filter out foreign running PBS tasks
Lukas Wagner
l.wagner at proxmox.com
Mon Nov 17 16:35:10 CET 2025
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 at 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
More information about the pdm-devel
mailing list