src/bin/proxmox-backup-proxy.rs: test if last sync job is still running

This commit is contained in:
Dietmar Maurer 2020-05-29 07:58:12 +02:00
parent 77ebbefc1a
commit 04ad7bc436
1 changed files with 6 additions and 3 deletions

View File

@ -507,12 +507,15 @@ async fn schedule_datastore_sync_jobs() {
}
};
//fixme: if last_sync_job_still_running { continue; }
let worker_type = "sync";
let last = match lookup_last_worker(worker_type, &job_id) {
Ok(Some(upid)) => upid.starttime,
Ok(Some(upid)) => {
if proxmox_backup::server::worker_is_active_local(&upid) {
continue;
}
upid.starttime
},
Ok(None) => 0,
Err(err) => {
eprintln!("lookup_last_job_start failed: {}", err);