Remove sleep calls

This commit is contained in:
Romain Neutron
2013-09-04 14:51:00 +02:00
parent c8d415c562
commit 5ed53ccda3
5 changed files with 30 additions and 26 deletions

View File

@@ -38,10 +38,7 @@ abstract class task_databoxAbstract extends task_abstract
if ($this->getRunner() == self::RUNNER_SCHEDULER) {
$this->log("appbox connection lost, restarting in 10 min.", self::LOG_ERROR);
// DON'T do sleep(600) because it prevents ticks !
for ($t = 60 * 10; $this->running && $t; $t--) {
sleep(1);
}
$this->sleep(60 * 10);
// because connection is lost we cannot change status to 'torestart'
// anyway the current status 'running' with no pid
// will enforce the scheduler to restart the task