prune: fix workerid issues
properly encode the namespace as separate field both for manual prunes and the job. fix the access checks as well now that the job doesn't use the jobid as workerid anymore. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
e13303fca6
commit
3697161800
@ -104,14 +104,17 @@ pub fn do_prune_job(
|
||||
|
||||
let worker_type = job.jobtype().to_string();
|
||||
let auth_id = auth_id.clone();
|
||||
let worker_id = format!("{store}");
|
||||
let upid_str = WorkerTask::new_thread(
|
||||
&worker_type,
|
||||
Some(job.jobname().to_string()),
|
||||
Some(worker_id),
|
||||
auth_id.to_string(),
|
||||
false,
|
||||
move |worker| {
|
||||
job.start(&worker.upid().to_string())?;
|
||||
|
||||
task_log!(worker, "prune job '{}'", job.jobname());
|
||||
|
||||
if let Some(event_str) = schedule {
|
||||
task_log!(worker, "task triggered by schedule '{}'", event_str);
|
||||
}
|
||||
|
Reference in New Issue
Block a user