send notification mails for GC and verify jobs

This commit is contained in:
Dietmar Maurer
2020-10-27 13:36:56 +01:00
parent acc3d9df5a
commit b9e7bcc272
4 changed files with 272 additions and 3 deletions

View File

@ -46,6 +46,8 @@ pub fn do_verification_job(
})
}
let email = crate::server::lookup_user_email(userid);
let job_id = job.jobname().to_string();
let worker_type = job.jobtype().to_string();
let upid_str = WorkerTask::new_thread(
@ -103,6 +105,12 @@ pub fn do_verification_job(
Ok(_) => (),
}
if let Some(email) = email {
if let Err(err) = crate::server::send_verify_status(&email, verification_job, &result) {
eprintln!("send verify notification failed: {}", err);
}
}
result
},
)?;