]> git.wh0rd.org - tt-rss.git/commitdiff
force minimum update interval at 5 minutes to prevent request flood (refs #369)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sun, 25 Sep 2011 16:34:53 +0000 (20:34 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sun, 25 Sep 2011 16:34:53 +0000 (20:34 +0400)
functions.php

index 93241fda3ae68635f3b022fae3204c87d8467961..4a28af4c185be6e13d095c0b15161c68d11d5846 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 '120 seconds')";
+                       $updstart_thresh_qpart = "AND (ttrss_feeds.last_update_started IS NULL OR ttrss_feeds.last_update_started < NOW() - INTERVAL '5 minutes')";
                } else {
-                       $updstart_thresh_qpart = "AND (ttrss_feeds.last_update_started IS NULL OR ttrss_feeds.last_update_started < DATE_SUB(NOW(), INTERVAL 120 SECOND))";
+                       $updstart_thresh_qpart = "AND (ttrss_feeds.last_update_started IS NULL OR ttrss_feeds.last_update_started < DATE_SUB(NOW(), INTERVAL 5 MINUTE))";
                }
 
                // Test if there is a limit to number of updated feeds