Background Updates: Spread them over the hour. Props Pento. Fixes #25833 for trunk
Built from https://develop.svn.wordpress.org/trunk@26149 git-svn-id: http://core.svn.wordpress.org/trunk@26060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
02841470a1
commit
a71cd00cdb
|
@ -405,6 +405,9 @@ function upgrade_all() {
|
|||
if ( $wp_current_db_version < 25824 )
|
||||
upgrade_370();
|
||||
|
||||
if ( $wp_current_db_version < 26148 )
|
||||
upgrade_372();
|
||||
|
||||
maybe_disable_link_manager();
|
||||
|
||||
maybe_disable_automattic_widgets();
|
||||
|
@ -1222,6 +1225,18 @@ function upgrade_370() {
|
|||
wp_clear_scheduled_hook( 'wp_auto_updates_maybe_update' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute changes made in WordPress 3.7.2.
|
||||
*
|
||||
* @since 3.7.2
|
||||
* @since 3.8.0
|
||||
*/
|
||||
function upgrade_372() {
|
||||
global $wp_current_db_version;
|
||||
if ( $wp_current_db_version < 26148 )
|
||||
wp_clear_scheduled_hook( 'wp_maybe_auto_update' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute network level changes
|
||||
*
|
||||
|
|
|
@ -584,6 +584,8 @@ function wp_schedule_update_checks() {
|
|||
$next += 12 * HOUR_IN_SECONDS;
|
||||
}
|
||||
$next = $next - get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;
|
||||
// Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
|
||||
$next = $next + rand( 0, 59 ) * MINUTE_IN_SECONDS;
|
||||
wp_schedule_event( $next, 'twicedaily', 'wp_maybe_auto_update' );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ $wp_version = '3.8-alpha-26127';
|
|||
*
|
||||
* @global int $wp_db_version
|
||||
*/
|
||||
$wp_db_version = 25824;
|
||||
$wp_db_version = 26148;
|
||||
|
||||
/**
|
||||
* Holds the TinyMCE version
|
||||
|
|
Loading…
Reference in New Issue