Make WordPress Core


Ignore:
Timestamp:
05/24/2015 05:25:52 PM (10 years ago)
Author:
DrewAPicture
Message:

Improve inline documentation for the cron lock behavior.

Props ericlewis.
Fixes #32478.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/cron.php

    r32116 r32580  
    226226
    227227    /*
    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     */
    231234    $lock = get_transient('doing_cron');
    232235
     
    267270    }
    268271
     272    // Set the cron lock with the current unix timestamp, when the cron is being spawned.
    269273    $doing_wp_cron = sprintf( '%.22F', $gmt_time );
    270274    set_transient( 'doing_cron', $doing_wp_cron );
Note: See TracChangeset for help on using the changeset viewer.