Moved email to background job
Refactored log_job to email_job