mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-64454 Admin: Configuration option for cron frequency warning
This change makes the warning time (default 200 seconds) configurable in config.php.
This commit is contained in:
parent
b18034ed67
commit
ff13ae5906
4 changed files with 13 additions and 3 deletions
|
@ -826,7 +826,8 @@ $errorsdisplayed = defined('WARN_DISPLAY_ERRORS_ENABLED');
|
|||
$lastcron = get_config('tool_task', 'lastcronstart');
|
||||
$cronoverdue = ($lastcron < time() - 3600 * 24);
|
||||
$lastcroninterval = get_config('tool_task', 'lastcroninterval');
|
||||
$croninfrequent = !$cronoverdue && ($lastcroninterval > 200 || $lastcron < time() - 200);
|
||||
$expectedfrequency = $CFG->expectedcronfrequency ?? 200;
|
||||
$croninfrequent = !$cronoverdue && ($lastcroninterval > $expectedfrequency || $lastcron < time() - $expectedfrequency);
|
||||
$dbproblems = $DB->diagnose();
|
||||
$maintenancemode = !empty($CFG->maintenance_enabled);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue