Ticket #32478: 32478.diff
| File 32478.diff, 1.7 KB (added by , 11 years ago) |
|---|
-
src/wp-cron.php
64 64 if ( isset($keys[0]) && $keys[0] > $gmt_time ) 65 65 die(); 66 66 67 $doing_cron_transient = get_transient( 'doing_cron');68 67 68 // The cron lock: a unix timestamp from when the cron was spawned. 69 $doing_cron_transient = get_transient( 'doing_cron' ); 70 69 71 // Use global $doing_wp_cron lock otherwise use the GET lock. If no lock, trying grabbing a new lock. 70 72 if ( empty( $doing_wp_cron ) ) { 71 73 if ( empty( $_GET[ 'doing_wp_cron' ] ) ) { … … 79 81 } 80 82 } 81 83 82 // Check lock 84 /* 85 * The cron lock (a unix timestamp set when the cron was spawned), 86 * must match $doing_wp_cron (the "key"). 87 */ 83 88 if ( $doing_cron_transient != $doing_wp_cron ) 84 89 return; 85 90 -
src/wp-includes/cron.php
225 225 return; 226 226 227 227 /* 228 * multiple processes on multiple web servers can run this code concurrently 229 * try to make this as atomic as possible by setting doing_cron switch 230 */ 228 * A unix timestamp of when the last cron was spawned and has not finished running. 229 * 230 * Multiple processes on multiple web servers can run this code concurrently, 231 * this lock attempts to make spawning as atomic as possible. 232 */ 231 233 $lock = get_transient('doing_cron'); 232 234 233 235 if ( $lock > $gmt_time + 10 * MINUTE_IN_SECONDS ) … … 266 268 return; 267 269 } 268 270 271 // Set the cron lock with the current unix timestamp, when the cron is being spawned. 269 272 $doing_wp_cron = sprintf( '%.22F', $gmt_time ); 270 273 set_transient( 'doing_cron', $doing_wp_cron ); 271 274
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)