diff options
author | Andrew Dolgov <[email protected]> | 2013-04-24 13:43:40 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-04-24 13:43:40 +0400 |
commit | fce451a4f796e8ccafc9aec692cb8821c085fc97 (patch) | |
tree | a1fd20f3cfe662751770ed9dc2991bd6fc6c9348 /include/rssfuncs.php | |
parent | 81c206634581595680ba784494f619ea977785f3 (diff) |
fix updating for pgsql
increase default batch size
remove random check between feedbrowser or update task executing
Diffstat (limited to 'include/rssfuncs.php')
-rw-r--r-- | include/rssfuncs.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php index e9b9c7142..ac00a9408 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -1,7 +1,7 @@ <?php - define('DAEMON_UPDATE_LOGIN_LIMIT', 30); - define('DAEMON_FEED_LIMIT', 100); - define('DAEMON_SLEEP_INTERVAL', 60); + define_default('DAEMON_UPDATE_LOGIN_LIMIT', 30); + define_default('DAEMON_FEED_LIMIT', 500); + define_default('DAEMON_SLEEP_INTERVAL', 60); function update_feedbrowser_cache() { @@ -113,8 +113,7 @@ $query_limit = ""; if($limit) $query_limit = sprintf("LIMIT %d", $limit); - // We search for feed needing update. - $result = db_query("SELECT DISTINCT ttrss_feeds.feed_url + $query = "SELECT DISTINCT ttrss_feeds.feed_url, ttrss_feeds.last_updated FROM ttrss_feeds, ttrss_users, ttrss_user_prefs WHERE @@ -123,7 +122,10 @@ AND ttrss_user_prefs.pref_name = 'DEFAULT_UPDATE_INTERVAL' $login_thresh_qpart $update_limit_qpart $updstart_thresh_qpart - ORDER BY last_updated $query_limit"); + ORDER BY last_updated $query_limit"; + + // We search for feed needing update. + $result = db_query($query); if($debug) _debug(sprintf("Scheduled %d feeds to update...", db_num_rows($result))); |