summaryrefslogtreecommitdiff
path: root/update_daemon.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-03-15 05:57:24 +0100
committerAndrew Dolgov <[email protected]>2007-03-15 05:57:24 +0100
commit34e420fb088e236fc19e54ad947ebd4b55eae534 (patch)
tree7b8d8d39535f46257b37dbdb61ca595e9abb590d /update_daemon.php
parent219bd8fcfcd91922aedba01a676dbd4068fbc803 (diff)
add some more daemon debugging
Diffstat (limited to 'update_daemon.php')
-rw-r--r--update_daemon.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/update_daemon.php b/update_daemon.php
index f99e4f763..37c04e28f 100644
--- a/update_daemon.php
+++ b/update_daemon.php
@@ -3,13 +3,19 @@
// this daemon runs in the background and updates all feeds
// continuously
- define('DEFAULT_ERROR_LEVEL', E_ALL);
+ // define('DEFAULT_ERROR_LEVEL', E_ALL);
+ define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE);
declare(ticks = 1);
define('MAGPIE_CACHE_DIR', '/var/tmp/magpie-ttrss-cache-daemon');
define('DISABLE_SESSIONS', true);
- define('DAEMON_EXTENDED_DEBUG', true);
+
+ require_once "version.php";
+
+ if (strpos(VERSION, ".99") !== false) {
+ define('DAEMON_EXTENDED_DEBUG', true);
+ }
define('PURGE_INTERVAL', 3600); // seconds
@@ -25,14 +31,20 @@
require_once "functions.php";
require_once "magpierss/rss_fetch.inc";
- error_reporting(E_ALL);
+ error_reporting(DEFAULT_ERROR_LEVEL);
function sigint_handler() {
unlink("update_daemon.lock");
die("Received SIGINT. Exiting.\n");
}
+// function sigalrm_handler() {
+// print "SIGALARM\n";
+// pcntl_alarm(3);
+// }
+
pcntl_signal(SIGINT, sigint_handler);
+// pcntl_signal(SIGALRM, sigalrm_handler);
$lock_handle = make_lockfile("update_daemon.lock");