]> git.proxmox.com Git - proxmox-backup.git/blobdiff - src/api2/pull.rs
server: notifications: send sync notifications via notification system
[proxmox-backup.git] / src / api2 / pull.rs
index 7fe2267ae4e35bf88f45ff1f798841a56b5ace20..5d02510c7748f0e2e19862d712fb49b7be6694b5 100644 (file)
@@ -114,8 +114,6 @@ pub fn do_sync_job(
         bail!("can't sync to same datastore");
     }
 
-    let (email, notify, _) = crate::server::lookup_datastore_notify_settings(&sync_job.store);
-
     let upid_str = WorkerTask::spawn(
         &worker_type,
         Some(job_id.clone()),
@@ -194,12 +192,8 @@ pub fn do_sync_job(
                 }
             }
 
-            if let Some(email) = email {
-                if let Err(err) =
-                    crate::server::send_sync_status(&email, notify, &sync_job2, &result)
-                {
-                    eprintln!("send sync notification failed: {}", err);
-                }
+            if let Err(err) = crate::server::send_sync_status(&sync_job2, &result) {
+                eprintln!("send sync notification failed: {err}");
             }
 
             result