]> git.wh0rd.org - tt-rss.git/commitdiff
increase updstart locking interval to prevent concurrent updates; decrease batch...
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 24 Apr 2013 10:15:46 +0000 (14:15 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 24 Apr 2013 10:23:38 +0000 (14:23 +0400)
include/rssfuncs.php
update.php
update_daemon2.php

index ac00a9408f4d8e49f531fe1868c343bb12fb4d66..f4fa18dc91c758122768a9dc2045c2024fb7794d 100644 (file)
 
                // Test if feed is currently being updated by another process.
                if (DB_TYPE == "pgsql") {
-                       $updstart_thresh_qpart = "AND (ttrss_feeds.last_update_started IS NULL OR ttrss_feeds.last_update_started < NOW() - INTERVAL '5 minutes')";
+                       $updstart_thresh_qpart = "AND (ttrss_feeds.last_update_started IS NULL OR ttrss_feeds.last_update_started < NOW() - INTERVAL '10 minutes')";
                } else {
-                       $updstart_thresh_qpart = "AND (ttrss_feeds.last_update_started IS NULL OR ttrss_feeds.last_update_started < DATE_SUB(NOW(), INTERVAL 5 MINUTE))";
+                       $updstart_thresh_qpart = "AND (ttrss_feeds.last_update_started IS NULL OR ttrss_feeds.last_update_started < DATE_SUB(NOW(), INTERVAL 10 MINUTE))";
                }
 
                // Test if there is a limit to number of updated feeds
index ce354bbae62c7680c54d1638b11f08e22784185b..0853f3dd551e01630134113750d5f28637313bb1 100755 (executable)
                        _debug("warning: unable to create stampfile\n");
                }
 
-               update_daemon_common();
+               update_daemon_common(isset($options["pidlock"]) ? 50 : DAEMON_FEED_LIMIT);
 
                $count = update_feedbrowser_cache();
                _debug("Feedbrowser updated, $count feeds processed.");
index 30787e6ab2494c2440d79cd6fc6857a8ce4036ed..7692eb93030c0ec583cfb229ebdcda8fa35bb71f 100755 (executable)
@@ -12,6 +12,7 @@
        require_once "config.php";
        require_once "autoload.php";
        require_once "functions.php";
+       require_once "rssfuncs.php";
 
        // defaults
        define_default('PURGE_INTERVAL', 3600); // seconds
@@ -19,7 +20,6 @@
        define_default('MAX_JOBS', 2);
        define_default('SPAWN_INTERVAL', DAEMON_SLEEP_INTERVAL); // seconds
 
-       require_once "rssfuncs.php";
        require_once "sanity_check.php";
        require_once "db.php";
        require_once "db-prefs.php";