]> git.proxmox.com Git - proxmox-backup.git/commitdiff
proxy: scheduler: code cleanup/bloat reduction
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 14 Jul 2022 16:10:05 +0000 (18:10 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 14 Jul 2022 16:20:12 +0000 (18:20 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/bin/proxmox-backup-proxy.rs

index ea0661fcdb4f24921bee6cc76d0e261a3042df2f..f907ac7cfd028f56d74ebee31b4bb42f256a05f9 100644 (file)
@@ -538,16 +538,10 @@ async fn run_task_scheduler() {
             // wait 1..2 minutes before starting
             match schedule_tasks().catch_unwind().await {
                 Err(panic) => match panic.downcast::<&str>() {
-                    Ok(msg) => {
-                        eprintln!("task scheduler panic: {}", msg);
-                    }
-                    Err(_) => {
-                        eprintln!("task scheduler panic - unknown type");
-                    }
+                    Ok(msg) => eprintln!("task scheduler panic: {msg}"),
+                    Err(_) => eprintln!("task scheduler panic - unknown type"),
                 },
-                Ok(Err(err)) => {
-                    eprintln!("task scheduler failed - {:?}", err);
-                }
+                Ok(Err(err)) => eprintln!("task scheduler failed - {err:?}"),
                 Ok(Ok(_)) => {}
             }
         }
@@ -690,8 +684,7 @@ async fn schedule_datastore_prune_jobs() {
         }
 
         if !job_config.options.keeps_something() {
-            // no 'keep' values set, keep all
-            continue;
+            continue; // no 'keep' values set, keep all
         }
 
         let worker_type = "prunejob";