daemon: do not schedule user-disabled feeds

This commit is contained in:
Andrew Dolgov 2013-03-31 14:24:13 +04:00
parent 1b1db7177f
commit cd7ebb39e4
1 changed files with 2 additions and 0 deletions

View File

@ -77,6 +77,7 @@
if (DB_TYPE == "pgsql") { if (DB_TYPE == "pgsql") {
$update_limit_qpart = "AND (( $update_limit_qpart = "AND ((
ttrss_feeds.update_interval = 0 ttrss_feeds.update_interval = 0
AND CAST(ttrss_user_prefs.value AS INTEGER) != -1
AND ttrss_feeds.last_updated < NOW() - CAST((ttrss_user_prefs.value || ' minutes') AS INTERVAL) AND ttrss_feeds.last_updated < NOW() - CAST((ttrss_user_prefs.value || ' minutes') AS INTERVAL)
) OR ( ) OR (
ttrss_feeds.update_interval > 0 ttrss_feeds.update_interval > 0
@ -86,6 +87,7 @@
} else { } else {
$update_limit_qpart = "AND (( $update_limit_qpart = "AND ((
ttrss_feeds.update_interval = 0 ttrss_feeds.update_interval = 0
AND CONVERT(ttrss_user_prefs.value, SIGNED INTEGER) != -1
AND ttrss_feeds.last_updated < DATE_SUB(NOW(), INTERVAL CONVERT(ttrss_user_prefs.value, SIGNED INTEGER) MINUTE) AND ttrss_feeds.last_updated < DATE_SUB(NOW(), INTERVAL CONVERT(ttrss_user_prefs.value, SIGNED INTEGER) MINUTE)
) OR ( ) OR (
ttrss_feeds.update_interval > 0 ttrss_feeds.update_interval > 0