// This is an experimental multiprocess update daemon.
// Some configurable variable may be found below.
- // define('DEFAULT_ERROR_LEVEL', E_ALL);
- define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE);
-
declare(ticks = 1);
define('DISABLE_SESSIONS', true);
require_once "functions.php";
require_once "lib/magpierss/rss_fetch.inc";
- error_reporting(DEFAULT_ERROR_LEVEL);
-
$children = array();
$ctimes = array();
foreach ($children as $pid) {
if (pcntl_waitpid($pid, $status, WNOHANG) != $pid) {
- if (file_is_locked(LOCK_DIRECTORY . "/update_daemon-$pid.lock")) {
+
+ if (file_is_locked("update_daemon-$pid.lock")) {
array_push($tmp, $pid);
} else {
_debug("[reap_children] child $pid seems active but lockfile is unlocked.");
update_daemon_common($link);
} else {
$count = update_feedbrowser_cache($link);
- _debug("Finished, $count feeds processed.");
+ _debug("Feedbrowser updated, $count feeds processed.");
+
+ purge_orphans($link, true);
+
+ $rc = cleanup_tags($link, 14, 50000);
+
+ _debug("Cleaned $rc cached tags.");
+
}
_debug("Elapsed time: " . (time() - $start_timestamp) . " second(s)");