]> git.wh0rd.org Git - tt-rss.git/commitdiff
daemon: sort by random
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 30 Mar 2013 12:28:21 +0000 (16:28 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 30 Mar 2013 12:28:21 +0000 (16:28 +0400)
include/rssfuncs.php
update.php
update_daemon2.php

index 01a11da6b535183096cb04158c82834575942160..0c5a0153bfddc0cf3ee28303139ddb6a13a68dc0 100644 (file)
                $random_qpart = sql_random_function();
 
                // We search for feed needing update.
-               $result = db_query($link, "SELECT DISTINCT ttrss_feeds.feed_url
+               $result = db_query($link, "SELECT DISTINCT ttrss_feeds.feed_url,$random_qpart
                        FROM
                                ttrss_feeds, ttrss_users, ttrss_user_prefs
                        WHERE
                                AND ttrss_user_prefs.pref_name = 'DEFAULT_UPDATE_INTERVAL'
                                $login_thresh_qpart $update_limit_qpart
                                $updstart_thresh_qpart
-                       ORDER BY feed_url $query_limit");
+                       ORDER BY $random_qpart $query_limit");
 
                $user_prefs_cache = array();
 
index 9c62ccb2a58ca7a5e112ceb6c06aa463613b9a0b..691e168e29a0309bcc0978ca832e5c3764f17ba0 100755 (executable)
 
        if (isset($options["daemon-loop"])) {
                if (!make_stampfile('update_daemon.stamp')) {
-                       die("error: unable to create stampfile\n");
+                       _debug("warning: unable to create stampfile\n");
                }
 
                // Call to the feed batch update function
index c8534af06c7db56327a099010f28d597440126f3..2933ccef015e7aa36fdf98aade849d279eb09435 100755 (executable)
                                        // We disable stamp file, since it is of no use in a multiprocess update.
                                        // not really, tho for the time being -fox
                                        if (!make_stampfile('update_daemon.stamp')) {
-                                               die("error: unable to create stampfile\n");
+                                               _debug("warning: unable to create stampfile\n");
                                        }
 
                                        // Call to the feed batch update function