summaryrefslogtreecommitdiff
path: root/update_daemon2.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-30 13:32:47 +0400
committerAndrew Dolgov <[email protected]>2013-03-30 13:32:50 +0400
commit5e63e2fc9f4675d1a2198f972e3c20373a3c0dcd (patch)
tree73b9e5fae4c6c3d394be39d721df456c6444c8bb /update_daemon2.php
parent7b11aa80ab83a679de5b032859a5bf40dd05acc8 (diff)
daemon2: make update tasks to wait before starting updates to improve
last_update_started handling (refs #647)
Diffstat (limited to 'update_daemon2.php')
-rwxr-xr-xupdate_daemon2.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/update_daemon2.php b/update_daemon2.php
index 9403d71a4..6f493b9b5 100755
--- a/update_daemon2.php
+++ b/update_daemon2.php
@@ -247,6 +247,8 @@
// or regenerate feedbrowser cache
if (rand(0,100) > 30) {
+ _debug("Waiting before update..");
+ sleep(rand(5,15));
update_daemon_common($link);
} else {
$count = update_feedbrowser_cache($link);
@@ -275,10 +277,6 @@
// We exit in order to avoid fork bombing.
exit(0);
}
-
- // We wait a little time before the next fork, in order to let the first fork
- // mark the feeds it update :
- sleep(10);
}
$last_checkpoint = time();
}