Making WordPress.org


Ignore:
Timestamp:
03/22/2019 05:33:27 PM (6 years ago)
Author:
iandunn
Message:

WordCamp Payments Network: Restore temporarily disabled cron jobs.

This reverts r8486. It turns out this was tangentially related, and the primary cause for the downtime was an issue with api.bruteprotect.com.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/payment-requests-dashboard.php

    r8486 r8493  
    1212
    1313        // Schedule the aggregate event only on the main blog in the network.
    14 //      if ( get_current_blog_id() == $current_site->blog_id && ! wp_next_scheduled( 'wordcamp_payments_aggregate' ) ) {
    15 //          wp_schedule_event( time(), 'hourly', 'wordcamp_payments_aggregate' );
    16 
    17 //      add_action( 'wordcamp_payments_aggregate', array( __CLASS__, 'aggregate' ) );
     14        if ( get_current_blog_id() == $current_site->blog_id && ! wp_next_scheduled( 'wordcamp_payments_aggregate' ) )
     15            wp_schedule_event( time(), 'hourly', 'wordcamp_payments_aggregate' );
     16
     17        add_action( 'wordcamp_payments_aggregate', array( __CLASS__, 'aggregate' ) );
    1818        add_action( 'network_admin_menu', array( __CLASS__, 'network_admin_menu' ) );
    1919        add_action( 'init', array( __CLASS__, 'upgrade' ) );
     
    2323        add_action( 'delete_post', array( __CLASS__, 'delete_post' ) );
    2424
    25 //      if ( ! empty( $_GET['wcp-debug-network'] ) && current_user_can( 'manage_network' ) )
    26 //          add_action( 'admin_init', function() { do_action( 'wordcamp_payments_aggregate' ); }, 99 );
     25        if ( ! empty( $_GET['wcp-debug-network'] ) && current_user_can( 'manage_network' ) ) {
     26            add_action( 'admin_init', function() {
     27                do_action( 'wordcamp_payments_aggregate' );
     28            }, 99 );
     29        }
    2730    }
    2831
Note: See TracChangeset for help on using the changeset viewer.