server/worker_task: let upid_read_status also return the endtime
the endtime should be the timestamp of the last log line or if there is no log at all, the starttime Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
4c116bafb8
commit
ae197dda23
@ -105,7 +105,7 @@ async fn get_task_status(
|
||||
if crate::server::worker_is_active(&upid).await? {
|
||||
result["status"] = Value::from("running");
|
||||
} else {
|
||||
let exitstatus = crate::server::upid_read_status(&upid).unwrap_or(TaskState::Unknown);
|
||||
let (_, exitstatus) = crate::server::upid_read_status(&upid).unwrap_or((0, TaskState::Unknown));
|
||||
result["status"] = Value::from("stopped");
|
||||
result["exitstatus"] = Value::from(exitstatus.to_string());
|
||||
};
|
||||
|
Reference in New Issue
Block a user