mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-08-12 22:35:35 +00:00
api: node tasks: small cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
9f43a9febf
commit
1f84ac052b
@ -296,9 +296,7 @@ async fn get_task_status(param: Value, rpcenv: &mut dyn RpcEnvironment) -> Resul
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn extract_upid(param: &Value) -> Result<UPID, Error> {
|
fn extract_upid(param: &Value) -> Result<UPID, Error> {
|
||||||
let upid_str = pbs_tools::json::required_string_param(param, "upid")?;
|
pbs_tools::json::required_string_param(param, "upid")?.parse::<UPID>()
|
||||||
|
|
||||||
upid_str.parse::<UPID>()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[sortable]
|
#[sortable]
|
||||||
@ -559,8 +557,7 @@ pub fn list_tasks(
|
|||||||
if let Some(since) = since {
|
if let Some(since) = since {
|
||||||
if let Some(ref state) = info.state {
|
if let Some(ref state) = info.state {
|
||||||
if state.endtime() < since {
|
if state.endtime() < since {
|
||||||
// we reached the tasks that ended before our 'since'
|
// we reached the tasks that ended before our 'since' so we can stop iterating
|
||||||
// so we can stop iterating
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user