src/bin/proxmox-backup-client.rs: new display task log helper

New helper to display worker task logs. Use it for prune (experimental).
This commit is contained in:
Dietmar Maurer
2019-12-07 16:11:26 +01:00
parent 6b508dd563
commit 163e9bbe91
2 changed files with 73 additions and 13 deletions

View File

@ -383,6 +383,7 @@ fn prune(
keep_yearly: param["keep-yearly"].as_u64(),
};
// We use a WorkerTask just to have a task log, but run synchrounously
let worker = WorkerTask::new("prune", Some(store.to_owned()), "root@pam", true)?;
let result = try_block! {
if !prune_options.keeps_something() {
@ -416,7 +417,7 @@ fn prune(
bail!("prune failed - {}", err);
}
Ok(json!(null))
Ok(json!(worker.to_string())) // return the UPID
}
#[sortable]