]> git.proxmox.com Git - proxmox-backup.git/commitdiff
worker task: remove debug print, faster modulo
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 29 Oct 2020 11:35:33 +0000 (12:35 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 29 Oct 2020 11:35:33 +0000 (12:35 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/server/worker_task.rs

index 8ef0fde755055af5d1bcdc6d5d472625b6fe6b0b..3cb30def043b6bd012f31eeaa2df62cfc7a29c69 100644 (file)
@@ -374,7 +374,7 @@ fn update_active_workers(new_upid: Option<&UPID>) -> Result<(), Error> {
             }
 
             if !worker_is_active_local(&info.upid) {
-                println!("Detected stopped UPID {}", &info.upid_str);
+                println!("Detected stopped task '{}'", &info.upid_str);
                 let now = proxmox::tools::time::epoch_i64();
                 let status = upid_read_status(&info.upid)
                     .unwrap_or_else(|_| TaskState::Unknown { endtime: now });
@@ -652,7 +652,7 @@ impl WorkerTask {
 
         let mut path = std::path::PathBuf::from(PROXMOX_BACKUP_TASK_DIR);
 
-        path.push(format!("{:02X}", upid.pstart % 256));
+        path.push(format!("{:02X}", upid.pstart & 255));
 
         let backup_user = crate::backup::backup_user()?;
 
@@ -660,8 +660,6 @@ impl WorkerTask {
 
         path.push(upid.to_string());
 
-        println!("FILE: {:?}", path);
-
         let logger_options = FileLogOptions {
             to_stdout: to_stdout,
             exclusive: true,