Making WordPress.org

Changeset 6571


Ignore:
Timestamp:
02/08/2018 06:48:51 PM (7 years ago)
Author:
obenland
Message:

Plugins: Add job to update support request data.

The old cronjob was removed with the recent server migrations. This also open-sources that part of the plugin directory.

Props jobthomas, dd32, tellyworth.
Fixes #3434.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs
Files:
1 added
1 edited

Legend:

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

    r6287 r6571  
    1919        // The actual cron hooks.
    2020        add_action( 'plugin_directory_meta_sync', array( __NAMESPACE__ . '\Meta_Sync', 'cron_trigger' ) );
     21        add_action( 'plugin_directory_plugin_support_resolved', array( __NAMESPACE__ . '\Plugin_Support_Resolved', 'cron_trigger' ) );
    2122        add_action( 'plugin_directory_svn_sync', array( __NAMESPACE__ . '\SVN_Watcher', 'cron_trigger' ) );
    2223        add_action( 'plugin_directory_update_api_check', array( __NAMESPACE__ . '\API_Update_Updater', 'cron_trigger' ) );
     
    2930            add_action( 'pre_option_cron', array( $this, 'register_colon_based_hook_handlers' ), 100 );
    3031        }
    31 
    3232    }
    3333
     
    3636     */
    3737    public function register_schedules( $schedules ) {
    38         $schedules['every_30s']  = array(
     38        $schedules['every_30s']   = array(
    3939            'interval' => 30,
    4040            'display'  => 'Every 30 seconds',
    4141        );
    42         $schedules['every_120s'] = array(
     42        $schedules['every_120s']  = array(
    4343            'interval' => 120,
    4444            'display'  => 'Every 120 seconds',
     45        );
     46        $schedules['half_hourly'] = array(
     47            'interval' => 30 * MINUTE_IN_SECONDS,
     48            'display'  => 'Half Hourly',
    4549        );
    4650
     
    225229    }
    226230
    227 
    228 
    229231    /**
    230232     * Queue all of our cron tasks.
     
    235237        if ( ! wp_next_scheduled( 'plugin_directory_meta_sync' ) ) {
    236238            wp_schedule_event( time() + 60, 'hourly', 'plugin_directory_meta_sync' );
     239        }
     240        if ( ! wp_next_scheduled( 'plugin_directory_plugin_support_resolved' ) ) {
     241            wp_schedule_event( time() + 60, 'half_hourly', 'plugin_directory_plugin_support_resolved' );
    237242        }
    238243        if ( ! wp_next_scheduled( 'plugin_directory_svn_sync' ) ) {
Note: See TracChangeset for help on using the changeset viewer.