#!/usr/bin/php PURGE_INTERVAL) { // FIXME : $last_purge is of no use in a multiprocess update. // FIXME : We ALWAYS purge old posts. _debug("Purging old posts (random 30 feeds)..."); global_purge_old_posts($link, true, 30); // $last_purge = time(); // } // Call to the feed batch update function update_daemon_common($link); _debug("Elapsed time: " . (time() - $start_timestamp) . " second(s)"); db_close($link); // We are in a fork. // We wait a little before exiting to avoid to be faster than our parent process. sleep(1); // We exit in order to avoid fork bombing. exit(0); } // We wait a little time before the next fork, in order to let the first fork // mark the feeds it update : sleep(1); } $last_checkpoint = time(); } sleep(1); } ?>