Changeset 13711 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs/class-plugin-import.php
- Timestamp:
- 05/16/2024 03:06:24 AM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs/class-plugin-import.php
r13234 r13711 14 14 public static function queue( $plugin_slug, $plugin_data ) { 15 15 // To avoid a situation where two imports run concurrently, if one is already scheduled, run it 1hr later (We'll trigger it after the current one finishes). 16 $when_to_run = time() + 10;16 $when_to_run = time() + 5; 17 17 if ( $next_scheduled = Manager::get_scheduled_time( "import_plugin:{$plugin_slug}", 'last' ) ) { 18 18 $when_to_run = $next_scheduled + HOUR_IN_SECONDS; … … 36 36 // Set some default values if not included from the caller. 37 37 $plugin_data['tags_touched'] ??= array( 'trunk' ); 38 $plugin_data['tags_deleted'] ??= array(); 38 39 $plugin_data['revisions'] ??= [ 0 ]; 39 40 $plugin_data['readme_touched'] ??= true; … … 42 43 43 44 $tags_touched = $plugin_data['tags_touched']; 45 $tags_deleted = $plugin_data['tags_deleted']; 44 46 $revision = max( (array) $plugin_data['revisions'] ); 45 47 46 48 $importer = new CLI\Import(); 47 49 try { 48 $importer->import_from_svn( $plugin_slug, $tags_touched, $ revision );50 $importer->import_from_svn( $plugin_slug, $tags_touched, $tags_deleted, $revision ); 49 51 } catch ( Exception $e ) { 50 52 fwrite( STDERR, "[{$plugin_slug}] Plugin Import Failed: " . $e->getMessage() . "\n" );
Note: See TracChangeset
for help on using the changeset viewer.