worker task: fix passing upid to send command

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-11-04 16:44:07 +01:00
parent be99df2767
commit 385681c9ab

View File

@ -55,7 +55,9 @@ pub async fn worker_is_active(upid: &UPID) -> Result<bool, Error> {
let sock = server::ctrl_sock_from_pid(upid.pid);
let cmd = json!({
"command": "worker-task-status",
"upid": upid.to_string(),
"args": {
"upid": upid.to_string(),
},
});
let status = super::send_command(sock, cmd).await?;
@ -127,7 +129,9 @@ pub async fn abort_worker(upid: UPID) -> Result<(), Error> {
let sock = server::ctrl_sock_from_pid(upid.pid);
let cmd = json!({
"command": "worker-task-abort",
"upid": upid.to_string(),
"args": {
"upid": upid.to_string(),
},
});
super::send_command(sock, cmd).map_ok(|_| ()).await
}