fix: task delay (pause) was not done

task restart too fast if nothing to do (worked only on first sbas)
This commit is contained in:
jygaulier
2012-06-11 15:34:37 +02:00
parent cc490082b5
commit 769d1a3182
2 changed files with 8 additions and 4 deletions

View File

@@ -111,7 +111,6 @@ abstract class task_databoxAbstract extends task_abstract
switch ($process_ret) {
case self::STATE_MAXMEGSREACHED:
case self::STATE_MAXRECSDONE:
case self::STATE_OK:
if ($this->getRunner() == self::RUNNER_SCHEDULER) {
$this->setState(self::STATE_TORESTART);
$this->running = FALSE;
@@ -133,7 +132,10 @@ abstract class task_databoxAbstract extends task_abstract
}
$this->incrementLoops();
$this->pause($duration);
if ($this->running) {
$this->pause($duration);
}
}
if ($task_must_delete) {