Changeset 32580
- Timestamp:
- 05/24/2015 05:25:52 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-cron.php
r31804 r32580 65 65 die(); 66 66 67 $doing_cron_transient = get_transient( 'doing_cron'); 67 68 // The cron lock: a unix timestamp from when the cron was spawned. 69 $doing_cron_transient = get_transient( 'doing_cron' ); 68 70 69 71 // Use global $doing_wp_cron lock otherwise use the GET lock. If no lock, trying grabbing a new lock. … … 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; -
trunk/src/wp-includes/cron.php
r32116 r32580 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 * Get the cron lock, which is a unix timestamp of when the last cron was spawned 229 * and has not finished running. 230 * 231 * Multiple processes on multiple web servers can run this code concurrently, 232 * this lock attempts to make spawning as atomic as possible. 233 */ 231 234 $lock = get_transient('doing_cron'); 232 235 … … 267 270 } 268 271 272 // Set the cron lock with the current unix timestamp, when the cron is being spawned. 269 273 $doing_wp_cron = sprintf( '%.22F', $gmt_time ); 270 274 set_transient( 'doing_cron', $doing_wp_cron );
Note: See TracChangeset
for help on using the changeset viewer.