MDL-48224 cron: Buffer SMTP connections around tasks

This commit is contained in:
Andrew Nicols
2014-12-12 10:39:19 +08:00
committed by John Okely
parent 8542d1875f
commit b1a381ffcf
3 changed files with 7 additions and 2 deletions
@@ -79,7 +79,6 @@ class legacy_plugin_cron_task extends scheduled_task {
// Run all cron jobs for each module.
mtrace("Starting activity modules");
get_mailer('buffer');
if ($mods = $DB->get_records_select("modules", "cron > 0 AND ((? - lastcron) > cron) AND visible = 1", array($timenow))) {
foreach ($mods as $mod) {
$libfile = "$CFG->dirroot/mod/$mod->name/lib.php";
@@ -105,7 +104,6 @@ class legacy_plugin_cron_task extends scheduled_task {
}
}
}
get_mailer('close');
mtrace("Finished activity modules");
mtrace("Starting blocks");