mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user