From: Jonas Theisen <j.theisen@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH datacenter-manager 2/2] remote-tasks: Align fetched PVE tasks to PBS and PDM API
Date: Fri, 28 Aug 2026 17:49:36 +0200 [thread overview]
Message-ID: <20260828155110.563237-3-j.theisen@proxmox.com> (raw)
In-Reply-To: <20260828155110.563237-1-j.theisen@proxmox.com>
Running tasks fetched from PVE's API have the status "RUNNING"
while PBS and PDM have None.
Since the filtering logic in PDM also expects the state to be None
for running tasks this patch aligns the status of fetched tasks.
With this applied running PVE tasks no longer display when filtering
for errored tasks in the Remote tab of PDM.
Signed-off-by: Jonas Theisen <j.theisen@proxmox.com>
---
server/src/remote_tasks/refresh_task.rs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/server/src/remote_tasks/refresh_task.rs b/server/src/remote_tasks/refresh_task.rs
index 668b63e4..3275bdb8 100644
--- a/server/src/remote_tasks/refresh_task.rs
+++ b/server/src/remote_tasks/refresh_task.rs
@@ -504,11 +504,17 @@ async fn poll_single_tracked_task(remote: Remote, task: RemoteUpid) -> (RemoteUp
fn map_pve_task(task: pve_api_types::ListTasksResponse, remote: String) -> TaskCacheItem {
let remote_upid = RemoteUpid::new(remote, RemoteType::Pve, task.upid);
+ // This is to align the PVE tasks to PBS and PDM tasks
+ let status = match task.status {
+ Some(ref s) if s == "RUNNING" => None,
+ other => other,
+ };
+
TaskCacheItem {
upid: remote_upid,
starttime: task.starttime,
endtime: task.endtime,
- status: task.status,
+ status: status,
}
}
--
2.47.3
prev parent reply other threads:[~2026-08-28 15:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 15:49 SPAM: [PATCH datacenter-manager 0/2] Remove running tasks from Jonas Theisen
2026-08-28 15:49 ` [PATCH datacenter-manager 1/2] api: Remove running tasks from errors output Jonas Theisen
2026-08-28 15:49 ` Jonas Theisen [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=20260828155110.563237-3-j.theisen@proxmox.com \
--to=j.theisen@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox