From: Dominik Csapak <d.csapak@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager 2/2] server: api: task: return upid in status
Date: Wed, 29 Jan 2025 11:44:50 +0100 [thread overview]
Message-ID: <20250129104450.1286995-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20250129104450.1286995-1-d.csapak@proxmox.com>
upid was not in params, since it's an extra parameter, so simply use that
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
server/src/api/nodes/tasks.rs | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/server/src/api/nodes/tasks.rs b/server/src/api/nodes/tasks.rs
index 13a713a..01361bd 100644
--- a/server/src/api/nodes/tasks.rs
+++ b/server/src/api/nodes/tasks.rs
@@ -273,18 +273,14 @@ fn stop_task(upid: UPID, rpcenv: &mut dyn RpcEnvironment) -> Result<(), Error> {
},
)]
/// Get task status.
-async fn get_task_status(
- upid: UPID,
- param: Value,
- rpcenv: &mut dyn RpcEnvironment,
-) -> Result<Value, Error> {
+async fn get_task_status(upid: UPID, rpcenv: &mut dyn RpcEnvironment) -> Result<Value, Error> {
let auth_id: Authid = rpcenv.get_auth_id().unwrap().parse()?;
check_task_access(&auth_id, &upid)?;
let task_auth_id: Authid = upid.auth_id.parse()?;
let mut result = json!({
- "upid": param["upid"],
+ "upid": upid.to_string(),
"node": upid.node,
"pid": upid.pid,
"pstart": upid.pstart,
--
2.39.5
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-01-29 10:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 10:44 [pdm-devel] [PATCH datacenter-manager 1/2] ui: pve tree: make name column collapse the text Dominik Csapak
2025-01-29 10:44 ` Dominik Csapak [this message]
2025-01-29 17:31 ` [pdm-devel] applied: [PATCH datacenter-manager 2/2] server: api: task: return upid in status Thomas Lamprecht
2025-01-29 17:22 ` [pdm-devel] [PATCH datacenter-manager 1/2] ui: pve tree: make name column collapse the text Thomas Lamprecht
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=20250129104450.1286995-2-d.csapak@proxmox.com \
--to=d.csapak@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.