Formatting cleanup
git-svn-id: https://develop.svn.wordpress.org/trunk@9403 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ac4b4e001e
commit
d3258d101e
@ -178,7 +178,9 @@ function spawn_cron( $local_time ) {
|
||||
if ( $timestamp > $local_time )
|
||||
return;
|
||||
|
||||
$cron_url = get_option( 'siteurl' ) . '/wp-cron.php?check=' . wp_hash('187425');
|
||||
// WPCOM: Use SERVER_ADDR
|
||||
//$cron_url = get_option( 'siteurl' ) . '/wp-cron.php?check=' . wp_hash('187425');
|
||||
$cron_url = 'http://' . $_SERVER['SERVER_ADDR'] . '/wp-cron.php?check=' . wp_hash('187425');
|
||||
/*
|
||||
* multiple processes on multiple web servers can run this code concurrently
|
||||
* try to make this as atomic as possible by setting doing_cron switch
|
||||
@ -187,13 +189,13 @@ function spawn_cron( $local_time ) {
|
||||
|
||||
// clean up potential invalid value resulted from various system chaos
|
||||
if ( $flag != 0 ) {
|
||||
if ( $flag > $local_time + 10*60 || $flag < $local_time - 10*60 ) {
|
||||
update_option('doing_cron', 0);
|
||||
$flag = 0;
|
||||
}
|
||||
if ( $flag > $local_time + 10*60 || $flag < $local_time - 10*60 ) {
|
||||
update_option('doing_cron', 0);
|
||||
$flag = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//don't run if another process is currently running it
|
||||
//don't run if another process is currently running it
|
||||
if ( $flag > $local_time )
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user