WordPress.org

Making WordPress.org


Ignore:
Timestamp:
12/13/2016 10:06:19 AM (4 years ago)
Author:
dd32
Message:

Plugin Directory: Flush the Cavalcade jobs cache as these methods need to operate on fresh data from the database - currently they may be unaware of another job added while the current process was running.

See #2330.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs/class-manager.php

    r4520 r4523  
    4747     */
    4848    public static function get_scheduled_time( $hook, $when = 'last' ) {
     49
     50        // Flush the Cavalcade jobs cache, we need fresh data from the database
     51        wp_cache_delete( 'jobs', 'cavalcade-jobs' );
     52
    4953        $crons = _get_cron_array();
    5054        if ( empty( $crons ) ) {
     
    8690    public static function reschedule_event( $hook, $new_timestamp = false, $old_timestamp = false ) {
    8791        $new_timestatmp = $new_timestamp ?: time();
     92
     93        // Flush the Cavalcade jobs cache, we need fresh data from the database
     94        wp_cache_delete( 'jobs', 'cavalcade-jobs' );
    8895
    8996        $crons = _get_cron_array();
Note: See TracChangeset for help on using the changeset viewer.