summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-30 16:28:21 +0400
committerAndrew Dolgov <[email protected]>2013-03-30 16:28:21 +0400
commite81610d9ef6b20400dfc1ab13b1d28cc0de32a84 (patch)
treed091404d5ccc8498daa26b610946d73e19f940dd
parent8292d05b7c9723bc91ccdf92f6acc5e46f58ce6c (diff)
daemon: sort by random
-rw-r--r--include/rssfuncs.php4
-rwxr-xr-xupdate.php2
-rwxr-xr-xupdate_daemon2.php2
3 files changed, 4 insertions, 4 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php
index 01a11da6b..0c5a0153b 100644
--- a/include/rssfuncs.php
+++ b/include/rssfuncs.php
@@ -108,7 +108,7 @@
$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
@@ -117,7 +117,7 @@
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();
diff --git a/update.php b/update.php
index 9c62ccb2a..691e168e2 100755
--- a/update.php
+++ b/update.php
@@ -153,7 +153,7 @@
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
diff --git a/update_daemon2.php b/update_daemon2.php
index c8534af06..2933ccef0 100755
--- a/update_daemon2.php
+++ b/update_daemon2.php
@@ -240,7 +240,7 @@
// 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