Skip to content

Commit

Permalink
Add queued_jobs_admin_email config variable for queuedjob error emails
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen McMahon committed Jul 10, 2014
1 parent 04db46b commit f0d35d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/services/QueuedJobService.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ public function __construct() {
}

}
if (Config::inst()->get('Email', 'queued_jobs_admin_email') == '') {
Config::inst()->update('Email', 'queued_jobs_admin_email', Config::inst()->get('Email', 'admin_email'));
}
}

/**
Expand Down Expand Up @@ -252,7 +255,7 @@ public function checkJobHealth() {
}

singleton('QJUtils')->log($msg);
$mail = new Email(Email::getAdminEmail(), Email::getAdminEmail(), _t('QueuedJobs.STALLED_JOB', 'Stalled job'), $msg);
$mail = new Email(Config::inst()->get('Email', 'admin_email'), Config::inst()->get('Email', 'queued_job_admin_email'), _t('QueuedJobs.STALLED_JOB', 'Stalled job'), $msg);
$mail->send();
}
}
Expand Down

0 comments on commit f0d35d5

Please sign in to comment.