api: make some workers log on CLI

some workers did not log when called via cli

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Dominik Csapak
2021-09-21 12:11:16 +02:00
committed by Thomas Lamprecht
parent f54634a890
commit bfa942c0cf
8 changed files with 25 additions and 14 deletions

View File

@ -66,6 +66,7 @@ pub fn do_sync_job(
sync_job: SyncJobConfig,
auth_id: &Authid,
schedule: Option<String>,
to_stdout: bool,
) -> Result<String, Error> {
let job_id = format!("{}:{}:{}:{}",
@ -81,7 +82,7 @@ pub fn do_sync_job(
&worker_type,
Some(job_id.clone()),
auth_id.clone(),
false,
to_stdout,
move |worker| async move {
job.start(&worker.upid().to_string())?;