Make WordPress Core

Changeset 26149


Ignore:
Timestamp:
11/14/2013 04:03:27 AM (11 years ago)
Author:
dd32
Message:

Background Updates: Spread them over the hour. Props Pento. Fixes #25833 for trunk

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/upgrade.php

    r26120 r26149  
    406406        upgrade_370();
    407407
     408    if ( $wp_current_db_version < 26148 )
     409        upgrade_372();
     410
    408411    maybe_disable_link_manager();
    409412
     
    12211224    if ( $wp_current_db_version < 25824 )
    12221225        wp_clear_scheduled_hook( 'wp_auto_updates_maybe_update' );
     1226}
     1227
     1228/**
     1229 * Execute changes made in WordPress 3.7.2.
     1230 *
     1231 * @since 3.7.2
     1232 * @since 3.8.0
     1233 */
     1234function upgrade_372() {
     1235    global $wp_current_db_version;
     1236    if ( $wp_current_db_version < 26148 )
     1237        wp_clear_scheduled_hook( 'wp_maybe_auto_update' );
    12231238}
    12241239
  • trunk/src/wp-includes/update.php

    r26081 r26149  
    585585        }
    586586        $next = $next - get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;
     587        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
     588        $next = $next + rand( 0, 59 ) * MINUTE_IN_SECONDS;
    587589        wp_schedule_event( $next, 'twicedaily', 'wp_maybe_auto_update' );
    588590    }
  • trunk/src/wp-includes/version.php

    r26127 r26149  
    1212 * @global int $wp_db_version
    1313 */
    14 $wp_db_version = 25824;
     14$wp_db_version = 26148;
    1515
    1616/**
Note: See TracChangeset for help on using the changeset viewer.