[pbs-devel] [PATCH proxmox-backup 1/1] prune: add upid to workertask log_result function

Gabriel Goller g.goller at proxmox.com
Wed Sep 3 16:13:47 CEST 2025


The prune job builds the workertask from scratch (when no `use-task`
option is pased) so we need to pass the upid and print the starting
message manually.

Signed-off-by: Gabriel Goller <g.goller at proxmox.com>
---
 src/api2/admin/datastore.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/api2/admin/datastore.rs b/src/api2/admin/datastore.rs
index a098aca8e114..3de28d2c6204 100644
--- a/src/api2/admin/datastore.rs
+++ b/src/api2/admin/datastore.rs
@@ -1002,8 +1002,10 @@ pub fn prune(
         let (worker, logger) =
             WorkerTask::new("prune", Some(worker_id), auth_id.to_string(), true)?;
         let result = LogContext::new(logger).sync_scope(|| {
+            let upid = worker.upid().to_string();
+            worker.log_start(&upid, "prune");
             let result = prune_group(worker.clone());
-            worker.log_result(&Ok(()));
+            worker.log_result(&Ok(()), &upid);
             result
         });
         Ok(json!(result))
-- 
2.47.2





More information about the pbs-devel mailing list