summaryrefslogtreecommitdiff
path: root/update_daemon2.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-04-05 18:42:59 +0400
committerAndrew Dolgov <[email protected]>2013-04-05 18:42:59 +0400
commita26f0c1759427ff23d26dc2b693b73562f9e72cd (patch)
treeb7fae7dd945f88b93bffa784825a13d3d7df79a2 /update_daemon2.php
parente5fac677c508f5b846c1138c1221d1cfc7a98901 (diff)
fix divide by zero in feeds/minute reporting (closes #668)
Diffstat (limited to 'update_daemon2.php')
-rwxr-xr-xupdate_daemon2.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/update_daemon2.php b/update_daemon2.php
index 37d6b4074..c6e215a29 100755
--- a/update_daemon2.php
+++ b/update_daemon2.php
@@ -284,7 +284,11 @@
_debug("Elapsed time: " . (time() - $start_timestamp) . " second(s)");
if ($nf > 0) {
- _debug("Feeds processed: $nf; feeds/minute: " . sprintf("%.2d", $nf/((time()-$start_timestamp)/60)));
+ _debug("Feeds processed: $nf");
+
+ if (time() - $start_timestamp > 0) {
+ _debug("Feeds/minute: " . sprintf("%.2d", $nf/((time()-$start_timestamp)/60)));
+ }
}
db_close($link);