summaryrefslogtreecommitdiff
path: root/update_daemon2.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-30 16:23:34 +0400
committerAndrew Dolgov <[email protected]>2013-03-30 16:25:10 +0400
commit8292d05b7c9723bc91ccdf92f6acc5e46f58ce6c (patch)
treef3ce90e8a0c36df0c58a80be058df93c65a0936f /update_daemon2.php
parent17e74b21cf7dcb6d57c44b3cbf5e4c330f5f2c17 (diff)
daemon: show feeds/minute stats
Diffstat (limited to 'update_daemon2.php')
-rwxr-xr-xupdate_daemon2.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/update_daemon2.php b/update_daemon2.php
index 6f493b9b5..c8534af06 100755
--- a/update_daemon2.php
+++ b/update_daemon2.php
@@ -246,10 +246,12 @@
// Call to the feed batch update function
// or regenerate feedbrowser cache
+ $nf = 0;
+
if (rand(0,100) > 30) {
_debug("Waiting before update..");
sleep(rand(5,15));
- update_daemon_common($link);
+ $nf = update_daemon_common($link);
} else {
$count = update_feedbrowser_cache($link);
_debug("Feedbrowser updated, $count feeds processed.");
@@ -266,6 +268,10 @@
_debug("Elapsed time: " . (time() - $start_timestamp) . " second(s)");
+ if ($nf > 0) {
+ _debug("Feeds processed: $nf; feeds/minute: " . sprintf("%.2d", $nf/((time()-$start_timestamp)/60)));
+ }
+
db_close($link);
// We are in a fork.