summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-04-24 14:54:59 +0400
committerAndrew Dolgov <[email protected]>2013-04-24 14:54:59 +0400
commite2cf81e21406f0b507446cf369f7da172ce9da14 (patch)
tree6c00059871b892a30c02d17336f7ed9cf268cb1c /include
parent654650857ffc3e4914c9655528e1037939f75f54 (diff)
unify houskeeping stuff, increase spawn interval
Diffstat (limited to 'include')
-rw-r--r--include/functions.php2
-rw-r--r--include/rssfuncs.php19
2 files changed, 15 insertions, 6 deletions
diff --git a/include/functions.php b/include/functions.php
index 72b20cd06..a41d3a950 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -922,7 +922,7 @@
function get_schema_version($nocache = false) {
global $schema_version;
- if (!$schema_version) {
+ if (!$schema_version && !$nocache) {
$result = db_query("SELECT schema_version FROM ttrss_version");
$version = db_fetch_result($result, 0, "schema_version");
$schema_version = $version;
diff --git a/include/rssfuncs.php b/include/rssfuncs.php
index 48638f57e..a64d60e1e 100644
--- a/include/rssfuncs.php
+++ b/include/rssfuncs.php
@@ -1,7 +1,7 @@
<?php
define_default('DAEMON_UPDATE_LOGIN_LIMIT', 30);
define_default('DAEMON_FEED_LIMIT', 500);
- define_default('DAEMON_SLEEP_INTERVAL', 60);
+ define_default('DAEMON_SLEEP_INTERVAL', 120);
function update_feedbrowser_cache() {
@@ -150,10 +150,6 @@
WHERE feed_url IN (%s)", implode(',', $feeds_quoted)));
}
- expire_cached_files($debug);
- expire_lock_files($debug);
- expire_error_log($debug);
-
$nf = 0;
// For each feed, we call the feed update function.
@@ -1374,4 +1370,17 @@
return $error;
}
+ function housekeeping_common($debug) {
+ expire_cached_files($debug);
+ expire_lock_files($debug);
+ expire_error_log($debug);
+
+ $count = update_feedbrowser_cache();
+ _debug("Feedbrowser updated, $count feeds processed.");
+
+ purge_orphans( true);
+ $rc = cleanup_tags( 14, 50000);
+
+ _debug("Cleaned $rc cached tags.");
+ }
?>