#2: trying to implement a semaphore with wp_options...

This commit is contained in:
Eric van der Vlist 2011-06-04 15:55:15 +02:00
parent 30fae5a621
commit dad0250e5a
1 changed files with 8 additions and 0 deletions

View File

@ -460,6 +460,13 @@ if (!class_exists("Owark")) {
*
*/
public static function schedule($occurrences) {
$archiving = get_option( 'owark_archiving', false);
if (! $archiving) {
update_option('owark_archiving', true);
} else {
return;
}
global $wpdb;
$query = "SELECT DISTINCT final_url from {$wpdb->prefix}blc_links
@ -490,6 +497,7 @@ if (!class_exists("Owark")) {
}
}
delete_option('owark_archiving');
}