Changeset 5233
- Timestamp:
- 04/04/2017 04:59:12 AM (8 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-svn-watcher.php
r4520 r5233 70 70 $logs = SVN::log( self::SVN_URL, array( $rev, $head_rev ) ); 71 71 if ( $logs['errors'] ) { 72 throw new Exception( "Could not fetch plugins.svn logs: " . implode( ', ', $logs['errors'] ) ); 72 if ( wp_cache_get( 'get_plugin_changes_between_failed', 'svn-watch' ) ) { 73 // Set it again, so if the next request fails, this exception will be thrown again, until the issue is resolved. 74 wp_cache_set( 'get_plugin_changes_between_failed', time(), 'svn-watch', 60 ); 75 76 throw new Exception( "Could not fetch plugins.svn logs: " . implode( ', ', $logs['errors'] ) ); 77 } else { 78 // If the job fails again within the next minute, throw an exception (as above) 79 // but for now, just silently let it re-try next iteration, hopefully it was a transient failure / network timeout. 80 wp_cache_set( 'get_plugin_changes_between_failed', time(), 'svn-watch', 60 ); 81 return array(); 82 } 73 83 } 74 84 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs/class-manager.php
r4727 r5233 11 11 12 12 /** 13 * A static method for the cron trigger to fire.13 * Add all the actions for cron tasks and schedules. 14 14 */ 15 15 public function __construct() { 16 16 // Register all the cron task handlers. 17 add_action( ' admin_init', array( $this, 'register_cron_tasks' ) );17 add_action( 'init', array( $this, 'register_cron_tasks' ) ); 18 18 add_filter( 'cron_schedules', array( $this, 'register_schedules' ) ); 19 19
Note: See TracChangeset
for help on using the changeset viewer.