config: remove option ENABLE_UPDATE_DAEMON
This commit is contained in:
parent
f56c6cd488
commit
dbaa4e4aac
|
@ -304,9 +304,7 @@
|
||||||
"icons_dir" => ICONS_DIR,
|
"icons_dir" => ICONS_DIR,
|
||||||
"icons_url" => ICONS_URL);
|
"icons_url" => ICONS_URL);
|
||||||
|
|
||||||
if (ENABLE_UPDATE_DAEMON) {
|
|
||||||
$config["daemon_is_running"] = file_is_locked("update_daemon.lock");
|
$config["daemon_is_running"] = file_is_locked("update_daemon.lock");
|
||||||
}
|
|
||||||
|
|
||||||
$result = db_query($link, "SELECT COUNT(*) AS cf FROM
|
$result = db_query($link, "SELECT COUNT(*) AS cf FROM
|
||||||
ttrss_feeds WHERE owner_uid = " . $_SESSION["uid"]);
|
ttrss_feeds WHERE owner_uid = " . $_SESSION["uid"]);
|
||||||
|
|
|
@ -38,12 +38,6 @@
|
||||||
define('TMP_DIRECTORY', '/tmp');
|
define('TMP_DIRECTORY', '/tmp');
|
||||||
// Directory for temporary files
|
// Directory for temporary files
|
||||||
|
|
||||||
define('ENABLE_UPDATE_DAEMON', false);
|
|
||||||
// This enables different mechanism for user-triggered updates designed
|
|
||||||
// for update daemon running in background on the server.
|
|
||||||
// This option suggests FEEDS_FRAME_REFRESH set to a small value
|
|
||||||
// (like 60 seconds, depending on number of users and server/bandwidth load).
|
|
||||||
|
|
||||||
define('DAEMON_SLEEP_INTERVAL', 120);
|
define('DAEMON_SLEEP_INTERVAL', 120);
|
||||||
// Interval between update daemon update runs
|
// Interval between update daemon update runs
|
||||||
|
|
||||||
|
|
|
@ -3231,7 +3231,6 @@
|
||||||
|
|
||||||
$params["theme"] = get_user_theme($link);
|
$params["theme"] = get_user_theme($link);
|
||||||
$params["theme_options"] = get_user_theme_options($link);
|
$params["theme_options"] = get_user_theme_options($link);
|
||||||
$params["daemon_enabled"] = ENABLE_UPDATE_DAEMON;
|
|
||||||
|
|
||||||
$params["sign_progress"] = theme_image($link, "images/indicator_white.gif");
|
$params["sign_progress"] = theme_image($link, "images/indicator_white.gif");
|
||||||
$params["sign_progress_tiny"] = theme_image($link, "images/indicator_tiny.gif");
|
$params["sign_progress_tiny"] = theme_image($link, "images/indicator_tiny.gif");
|
||||||
|
@ -3288,7 +3287,7 @@
|
||||||
$data['last_article_id'] = getLastArticleId($link);
|
$data['last_article_id'] = getLastArticleId($link);
|
||||||
$data['cdm_expanded'] = get_pref($link, 'CDM_EXPANDED');
|
$data['cdm_expanded'] = get_pref($link, 'CDM_EXPANDED');
|
||||||
|
|
||||||
if (ENABLE_UPDATE_DAEMON) {
|
if (file_exists(LOCK_DIRECTORY . "/update_daemon.lock")) {
|
||||||
|
|
||||||
$data['daemon_is_running'] = (int) file_is_locked("update_daemon.lock");
|
$data['daemon_is_running'] = (int) file_is_locked("update_daemon.lock");
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php # This file has been generated at: Tue Apr 12 19:27:00 MSD 2011
|
<?php # This file has been generated at: Tue Apr 12 19:32:50 MSD 2011
|
||||||
define('GENERATED_CONFIG_CHECK', 22);
|
define('GENERATED_CONFIG_CHECK', 22);
|
||||||
$requred_defines = array( 'DB_TYPE', 'DB_HOST', 'DB_USER', 'DB_NAME', 'DB_PASS', 'SELF_URL_PATH', 'MAGPIE_FETCH_TIME_OUT', 'MAGPIE_CACHE_DIR', 'ICONS_DIR', 'ICONS_URL', 'SINGLE_USER_MODE', 'TMP_DIRECTORY', 'ENABLE_UPDATE_DAEMON', 'DAEMON_SLEEP_INTERVAL', 'DATABASE_BACKED_SESSIONS', 'SESSION_CHECK_ADDRESS', 'SESSION_COOKIE_LIFETIME', 'SESSION_EXPIRE_TIME', 'DAEMON_UPDATE_LOGIN_LIMIT', 'CHECK_FOR_NEW_VERSION', 'DIGEST_ENABLE', 'DIGEST_EMAIL_LIMIT', 'DAEMON_SENDS_DIGESTS', 'MYSQL_CHARSET', 'DEFAULT_UPDATE_METHOD', 'SIMPLEPIE_CACHE_DIR', 'SIMPLEPIE_CACHE_IMAGES', 'COUNTERS_MAX_AGE', 'DIGEST_FROM_NAME', 'DIGEST_FROM_ADDRESS', 'DIGEST_SUBJECT', 'DIGEST_SMTP_HOST', 'DIGEST_SMTP_LOGIN', 'DIGEST_SMTP_PASSWORD', 'DAEMON_FEED_LIMIT', 'ALLOW_REMOTE_USER_AUTH', 'AUTO_LOGIN', 'AUTO_CREATE_USER', 'LOCK_DIRECTORY', 'ENABLE_GZIP_OUTPUT', 'PHP_EXECUTABLE', 'ENABLE_REGISTRATION', 'REG_NOTIFY_ADDRESS', 'REG_MAX_USERS', 'FEEDBACK_URL', 'FORCE_ARTICLE_PURGE', 'SPHINX_ENABLED', 'SPHINX_INDEX', 'ENABLE_TWEET_BUTTON', 'CONSUMER_KEY', 'CONSUMER_SECRET', 'PUBSUBHUBBUB_HUB', 'ISCONFIGURED', 'CONFIG_VERSION'); ?>
|
$requred_defines = array( 'DB_TYPE', 'DB_HOST', 'DB_USER', 'DB_NAME', 'DB_PASS', 'SELF_URL_PATH', 'MAGPIE_FETCH_TIME_OUT', 'MAGPIE_CACHE_DIR', 'ICONS_DIR', 'ICONS_URL', 'SINGLE_USER_MODE', 'TMP_DIRECTORY', 'DAEMON_SLEEP_INTERVAL', 'DATABASE_BACKED_SESSIONS', 'SESSION_CHECK_ADDRESS', 'SESSION_COOKIE_LIFETIME', 'SESSION_EXPIRE_TIME', 'DAEMON_UPDATE_LOGIN_LIMIT', 'CHECK_FOR_NEW_VERSION', 'DIGEST_ENABLE', 'DIGEST_EMAIL_LIMIT', 'DAEMON_SENDS_DIGESTS', 'MYSQL_CHARSET', 'DEFAULT_UPDATE_METHOD', 'SIMPLEPIE_CACHE_DIR', 'SIMPLEPIE_CACHE_IMAGES', 'COUNTERS_MAX_AGE', 'DIGEST_FROM_NAME', 'DIGEST_FROM_ADDRESS', 'DIGEST_SUBJECT', 'DIGEST_SMTP_HOST', 'DIGEST_SMTP_LOGIN', 'DIGEST_SMTP_PASSWORD', 'DAEMON_FEED_LIMIT', 'ALLOW_REMOTE_USER_AUTH', 'AUTO_LOGIN', 'AUTO_CREATE_USER', 'LOCK_DIRECTORY', 'ENABLE_GZIP_OUTPUT', 'PHP_EXECUTABLE', 'ENABLE_REGISTRATION', 'REG_NOTIFY_ADDRESS', 'REG_MAX_USERS', 'FEEDBACK_URL', 'FORCE_ARTICLE_PURGE', 'SPHINX_ENABLED', 'SPHINX_INDEX', 'ENABLE_TWEET_BUTTON', 'CONSUMER_KEY', 'CONSUMER_SECRET', 'PUBSUBHUBBUB_HUB', 'ISCONFIGURED', 'CONFIG_VERSION'); ?>
|
||||||
|
|
|
@ -64,9 +64,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($op == "-daemon") {
|
if ($op == "-daemon") {
|
||||||
if (!ENABLE_UPDATE_DAEMON)
|
|
||||||
die("Please enable option ENABLE_UPDATE_DAEMON in config.php\n");
|
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
passthru(PHP_EXECUTABLE . " " . $argv[0] . " -daemon-loop");
|
passthru(PHP_EXECUTABLE . " " . $argv[0] . " -daemon-loop");
|
||||||
_debug("Sleeping for " . DAEMON_SLEEP_INTERVAL . " seconds...");
|
_debug("Sleeping for " . DAEMON_SLEEP_INTERVAL . " seconds...");
|
||||||
|
|
|
@ -26,10 +26,6 @@
|
||||||
die("error: This script requires PHP compiled with PCNTL module.\n");
|
die("error: This script requires PHP compiled with PCNTL module.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ENABLE_UPDATE_DAEMON) {
|
|
||||||
die("error: Please enable option ENABLE_UPDATE_DAEMON in config.php\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once "db.php";
|
require_once "db.php";
|
||||||
require_once "db-prefs.php";
|
require_once "db-prefs.php";
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
|
|
Loading…
Reference in New Issue