Skip to content

Commit

Permalink
Merge pull request #19 from stephenmcm/queued_jobs_admin_email
Browse files Browse the repository at this point in the history
Add queued_jobs_admin_email config variable for queuedjob error emails
  • Loading branch information
nyeholt committed Nov 4, 2014
2 parents 1a80e96 + f0d35d5 commit 0eebce6
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 @@ -249,7 +252,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 0eebce6

Please sign in to comment.