mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-20 06:01:29 +00:00
daemon2: make update tasks to wait before starting updates to improve
last_update_started handling (refs #647)
This commit is contained in:
@@ -247,6 +247,8 @@
|
|||||||
// or regenerate feedbrowser cache
|
// or regenerate feedbrowser cache
|
||||||
|
|
||||||
if (rand(0,100) > 30) {
|
if (rand(0,100) > 30) {
|
||||||
|
_debug("Waiting before update..");
|
||||||
|
sleep(rand(5,15));
|
||||||
update_daemon_common($link);
|
update_daemon_common($link);
|
||||||
} else {
|
} else {
|
||||||
$count = update_feedbrowser_cache($link);
|
$count = update_feedbrowser_cache($link);
|
||||||
@@ -275,10 +277,6 @@
|
|||||||
// We exit in order to avoid fork bombing.
|
// We exit in order to avoid fork bombing.
|
||||||
exit(0);
|
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();
|
$last_checkpoint = time();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user