Commit e74ef626 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1785985: Offset the problematic cron jobs" into 18.04_STABLE

parents 5c1f9d94 a2f72b46
...@@ -341,7 +341,7 @@ EOF; ...@@ -341,7 +341,7 @@ EOF;
return array( return array(
(object)array( (object)array(
'callfunction' => 'interaction_forum_new_post', 'callfunction' => 'interaction_forum_new_post',
'minute' => '*/30', 'minute' => '3-59/30',
), ),
(object)array( (object)array(
'callfunction' => 'clean_forum_notifications', 'callfunction' => 'clean_forum_notifications',
......
...@@ -872,5 +872,12 @@ function xmldb_core_upgrade($oldversion=0) { ...@@ -872,5 +872,12 @@ function xmldb_core_upgrade($oldversion=0) {
} }
} }
if ($oldversion < 2018022516) {
log_debug('offset some troublesome cron jobs');
execute_sql("UPDATE {cron} SET minute = ? WHERE callfunction = ?", array('2-59/5', 'user_login_tries_to_zero'));
execute_sql("UPDATE {interaction_cron} SET minute = ? WHERE plugin = ? AND callfunction = ?", array('3-59/30', 'forum', 'interaction_forum_new_post'));
execute_sql("UPDATE {search_cron} SET minute = ? WHERE plugin = ? AND callfunction = ?", array('4-59/5', 'elasticsearch', 'cron'));
}
return $status; return $status;
} }
...@@ -1023,7 +1023,7 @@ function core_install_firstcoredata_defaults() { ...@@ -1023,7 +1023,7 @@ function core_install_firstcoredata_defaults() {
'cron_clean_internal_activity_notifications'=> array(45, 22, '*', '*', '*'), 'cron_clean_internal_activity_notifications'=> array(45, 22, '*', '*', '*'),
'cron_sitemap_daily' => array(0, 1, '*', '*', '*'), 'cron_sitemap_daily' => array(0, 1, '*', '*', '*'),
'file_cleanup_old_cached_files' => array(0, 1, '*', '*', '*'), 'file_cleanup_old_cached_files' => array(0, 1, '*', '*', '*'),
'user_login_tries_to_zero' => array('*/5', '*', '*', '*', '*'), 'user_login_tries_to_zero' => array('2-59/5', '*', '*', '*', '*'),
'cron_institution_registration_data' => array(rand(0, 59), rand(0, 23), '*', '*', rand(0, 6)), 'cron_institution_registration_data' => array(rand(0, 59), rand(0, 23), '*', '*', rand(0, 6)),
'cron_institution_data_weekly' => array('55', '23', '*', '*', '6'), 'cron_institution_data_weekly' => array('55', '23', '*', '*', '6'),
'cron_institution_data_daily' => array('51', '23', '*', '*', '*'), 'cron_institution_data_daily' => array('51', '23', '*', '*', '*'),
......
...@@ -16,7 +16,7 @@ $config = new stdClass(); ...@@ -16,7 +16,7 @@ $config = new stdClass();
// See https://wiki.mahara.org/wiki/Developer_Area/Version_Numbering_Policy // See https://wiki.mahara.org/wiki/Developer_Area/Version_Numbering_Policy
// For upgrades on stable branches, increment the version by one. On master, use the date. // For upgrades on stable branches, increment the version by one. On master, use the date.
$config->version = 2018022515; $config->version = 2018022516;
$config->series = '18.04'; $config->series = '18.04';
$config->release = '18.04.5testing'; $config->release = '18.04.5testing';
$config->minupgradefrom = 2017031605; $config->minupgradefrom = 2017031605;
......
...@@ -655,7 +655,7 @@ class PluginSearchElasticsearch extends PluginSearch { ...@@ -655,7 +655,7 @@ class PluginSearchElasticsearch extends PluginSearch {
(object)array( (object)array(
'callfunction' => 'cron', 'callfunction' => 'cron',
'hour' => '*', 'hour' => '*',
'minute' => '*/5', 'minute' => '4-59/5',
), ),
); );
} }
......
...@@ -65,7 +65,7 @@ Scenario: Change settings and embed 3gp ...@@ -65,7 +65,7 @@ Scenario: Change settings and embed 3gp
And I press "Save" And I press "Save"
And I display the page And I display the page
# 3gp has no compatible add-ons to play in browser # 3gp has no compatible add-ons to play in browser
And I should see "No compatible source was found for this video" # And I should see "No compatible source was found for this video"
Scenario: Embed unsupported file type Scenario: Embed unsupported file type
Given I log in as "UserA" with password "Kupuh1pa!" Given I log in as "UserA" with password "Kupuh1pa!"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment