mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 23:57:41 +02:00
Term Splitting: Switch to a faster cron unschedule process to benefit sites with thousands of affected jobs. Fix the cron hook name in the failsafe rescheduler.
Props Otto42, dd32, peterwilsoncc See #33423 Built from https://develop.svn.wordpress.org/trunk@33727 git-svn-id: http://core.svn.wordpress.org/trunk@33695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0401ee6007
commit
4f8ce1c232
@ -1590,11 +1590,8 @@ function upgrade_431() {
|
|||||||
// Fix incorrect cron entries for term splitting
|
// Fix incorrect cron entries for term splitting
|
||||||
$cron_array = _get_cron_array();
|
$cron_array = _get_cron_array();
|
||||||
if ( isset( $cron_array['wp_batch_split_terms'] ) ) {
|
if ( isset( $cron_array['wp_batch_split_terms'] ) ) {
|
||||||
foreach ( $cron_array['wp_batch_split_terms'] as $timestamp_hook => $cron_data ) {
|
unset( $cron_array['wp_batch_split_terms'] );
|
||||||
foreach ( $cron_data as $key => $args ) {
|
_set_cron_array( $cron_array );
|
||||||
wp_unschedule_event( 'wp_batch_split_terms', $timestamp_hook, $args['args'] );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4441,15 +4441,15 @@ function _wp_batch_split_terms() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* In order to avoid the wp_batch_split_terms() job being accidentally removed,
|
* In order to avoid the _wp_batch_split_terms() job being accidentally removed,
|
||||||
* check that it's still scheduled while we haven't finished splitting terms.
|
* check that it's still scheduled while we haven't finished splitting terms.
|
||||||
*
|
*
|
||||||
* @ignore
|
* @ignore
|
||||||
* @since 4.3.0
|
* @since 4.3.0
|
||||||
*/
|
*/
|
||||||
function _wp_check_for_scheduled_split_terms() {
|
function _wp_check_for_scheduled_split_terms() {
|
||||||
if ( ! get_option( 'finished_splitting_shared_terms' ) && ! wp_next_scheduled( 'wp_batch_split_terms' ) ) {
|
if ( ! get_option( 'finished_splitting_shared_terms' ) && ! wp_next_scheduled( 'wp_split_shared_term_batch' ) ) {
|
||||||
wp_schedule_single_event( time() + MINUTE_IN_SECONDS, 'wp_batch_split_terms' );
|
wp_schedule_single_event( time() + MINUTE_IN_SECONDS, 'wp_split_shared_term_batch' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-alpha-33726';
|
$wp_version = '4.4-alpha-33727';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user