src/server/worker_task.rs: Avoid using pbs-api-type::Authid

Because we want to move worker_task.rs into proxmox-rest-server crate.
This commit is contained in:
Dietmar Maurer
2021-09-21 12:14:19 +02:00
parent 4d4f94dedf
commit 049a22a3a3
25 changed files with 55 additions and 51 deletions

View File

@ -195,7 +195,7 @@ pub fn do_tape_backup_job(
let upid_str = WorkerTask::new_thread(
&worker_type,
Some(job_id.clone()),
auth_id.clone(),
auth_id.to_string(),
to_stdout,
move |worker| {
job.start(&worker.upid().to_string())?;
@ -376,7 +376,7 @@ pub fn backup(
let upid_str = WorkerTask::new_thread(
"tape-backup",
Some(job_id),
auth_id,
auth_id.to_string(),
to_stdout,
move |worker| {
let _drive_lock = drive_lock; // keep lock guard

View File

@ -87,7 +87,7 @@ where
let (config, _digest) = pbs_config::drive::config()?;
let lock_guard = lock_tape_device(&config, &drive)?;
let auth_id: Authid = rpcenv.get_auth_id().unwrap().parse()?;
let auth_id = rpcenv.get_auth_id().unwrap();
let to_stdout = rpcenv.env_type() == RpcEnvironmentType::CLI;
WorkerTask::new_thread(worker_type, job_id, auth_id, to_stdout, move |worker| {

View File

@ -275,7 +275,7 @@ pub fn restore(
let upid_str = WorkerTask::new_thread(
"tape-restore",
Some(taskid),
auth_id.clone(),
auth_id.to_string(),
to_stdout,
move |worker| {
let _drive_lock = drive_lock; // keep lock guard