daemon: use define_default

This commit is contained in:
Andrew Dolgov 2013-04-24 13:52:09 +04:00
parent fce451a4f7
commit 0e6bdaeff0
1 changed files with 9 additions and 11 deletions

View File

@ -9,24 +9,22 @@
define('DISABLE_SESSIONS', true); define('DISABLE_SESSIONS', true);
require_once "version.php"; require_once "version.php";
require_once "config.php";
if (strpos(VERSION, ".99") !== false || getenv('DAEMON_XDEBUG')) {
define('DAEMON_EXTENDED_DEBUG', true);
}
require_once "autoload.php"; require_once "autoload.php";
require_once "functions.php"; require_once "functions.php";
// defaults
define_default('PURGE_INTERVAL', 3600); // seconds
define_default('MAX_CHILD_RUNTIME', 600); // seconds
define_default('MAX_JOBS', 2);
define_default('SPAWN_INTERVAL', DAEMON_SLEEP_INTERVAL); // seconds
define_default('DAEMON_FEED_LIMIT', 250);
require_once "rssfuncs.php"; require_once "rssfuncs.php";
require_once "sanity_check.php"; require_once "sanity_check.php";
require_once "config.php";
require_once "db.php"; require_once "db.php";
require_once "db-prefs.php"; require_once "db-prefs.php";
// defaults
define('PURGE_INTERVAL', 3600); // seconds
define('MAX_CHILD_RUNTIME', 600); // seconds
define('MAX_JOBS', 2);
define('SPAWN_INTERVAL', DAEMON_SLEEP_INTERVAL); // seconds
if (!function_exists('pcntl_fork')) { if (!function_exists('pcntl_fork')) {
die("error: This script requires PHP compiled with PCNTL module.\n"); die("error: This script requires PHP compiled with PCNTL module.\n");