move worker_task.rs into proxmox-rest-server crate

Also moved pbs-datastore/src/task.rs to pbs-tools, which now depends on 'log'.
This commit is contained in:
Dietmar Maurer
2021-09-23 10:09:19 +02:00
parent 81867f0539
commit b9700a9fe5
46 changed files with 176 additions and 183 deletions

View File

@ -235,12 +235,12 @@ async fn handle_worker(upid_str: &str) -> Result<(), Error> {
let abort_future = async move {
while signal_stream.recv().await.is_some() {
println!("got shutdown request (SIGINT)");
proxmox_backup::server::abort_local_worker(upid.clone());
proxmox_rest_server::abort_local_worker(upid.clone());
}
Ok::<_, Error>(())
};
let result_future = proxmox_backup::server::wait_for_local_worker(upid_str);
let result_future = proxmox_rest_server::wait_for_local_worker(upid_str);
futures::select! {
result = result_future.fuse() => result?,