Changeset 5448 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs/class-plugin-i18n-import.php
- Timestamp:
- 04/30/2017 07:08:29 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs/class-plugin-i18n-import.php
r4670 r5448 1 1 <?php 2 2 namespace WordPressdotorg\Plugin_Directory\Jobs; 3 3 4 use WordPressdotorg\Plugin_Directory\Plugin_Directory; 4 5 use WordPressdotorg\Plugin_Directory\CLI; … … 6 7 7 8 /** 8 * Import plugin string changes into WordPress.9 * Import plugin string changes to translate.wordpress.org. 9 10 * 10 11 * @package WordPressdotorg\Plugin_Directory\Jobs … … 15 16 16 17 /** 17 * Queue the job 18 * Queue the job 18 19 */ 19 20 public static function queue( $plugin_slug, $plugin_data ) { 20 if ( 'nothing-much' != $plugin_slug ) {21 return;22 }23 24 21 // 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). 25 $when_to_run = time() + 15 *MINUTE_IN_SECONDS;22 $when_to_run = time() + 15 * MINUTE_IN_SECONDS; 26 23 if ( $next_scheuled = Manager::get_scheduled_time( "import_plugin_i18n:{$plugin_slug}", 'last' ) ) { 27 24 $when_to_run = $next_scheuled + HOUR_IN_SECONDS;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)