// define('DEFAULT_ERROR_LEVEL', E_ALL);
define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE);
+ $start_timestamp = time();
+
if ($argv[1] != "SRV_RUN_OK") {
die("This script should be started by update_daemon2.php.\n");
}
$last_purge = 0;
-// if (!make_stampfile('update_daemon.stamp')) {
-// print "error: unable to create stampfile";
-// die;
-// }
+ if (!make_stampfile('update_daemon.stamp')) {
+ print "warning: unable to create stampfile";
+ }
if (time() - $last_purge > PURGE_INTERVAL) {
_debug("Purging old posts (random 30 feeds)...");
if (DAEMON_SENDS_DIGESTS) send_headlines_digests($link);
+ print "Elapsed time: " . (time() - $start_timestamp) . " second(s)\n";
+
db_close($link);
?>