summaryrefslogtreecommitdiff
path: root/update_daemon.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-03-21 08:09:18 +0100
committerAndrew Dolgov <[email protected]>2006-03-21 08:09:18 +0100
commit894ebcf5e94c917f5e10e5196f74b8055e2b2407 (patch)
treea6ae843d7622de23a464e43b00942fdf00a27006 /update_daemon.php
parentac92cb46be4fad924be5e03f46fed7000c3dea81 (diff)
update_daemon work, remove unneeded indexes, query optimizations
Diffstat (limited to 'update_daemon.php')
-rw-r--r--update_daemon.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/update_daemon.php b/update_daemon.php
index cf51bdd3a..8c36fda68 100644
--- a/update_daemon.php
+++ b/update_daemon.php
@@ -55,8 +55,8 @@
while (true) {
if (time() - $last_purge > PURGE_INTERVAL) {
- print "Purging old posts...\n";
- global_purge_old_posts($link, true);
+ print "Purging old posts (random 30 feeds)...\n";
+ global_purge_old_posts($link, true, 30);
$last_purge = time();
}
@@ -71,9 +71,11 @@
// Process all other feeds using last_updated and interval parameters
+ $random_qpart = sql_random_function();
+
$result = db_query($link, "SELECT feed_url,id,owner_uid,
SUBSTRING(last_updated,1,19) AS last_updated,
- update_interval FROM ttrss_feeds ORDER BY last_updated DESC");
+ update_interval FROM ttrss_feeds ORDER BY $random_qpart DESC");
$user_prefs_cache = array();