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

@@ -84,7 +84,6 @@ abstract class task_appboxAbstract 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;
@@ -104,7 +103,10 @@ abstract class task_appboxAbstract extends task_abstract
} // if(row)
$this->incrementLoops();
$this->pause($duration);
if ($this->running) {
$this->pause($duration);
}
} // while running
return;