Store the in_progress flag for all workers [MAILPOET-2443]
This commit is contained in:
@ -108,15 +108,14 @@ abstract class SimpleWorker {
|
|||||||
if ($this->isInProgress($task)) {
|
if ($this->isInProgress($task)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->startProgress($task);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->startProgress($task);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$completed = $this->processTaskStrategy($task);
|
$completed = $this->processTaskStrategy($task);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
if (!static::SUPPORT_MULTIPLE_INSTANCES) {
|
$this->stopProgress($task);
|
||||||
$this->stopProgress($task);
|
|
||||||
}
|
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,9 +123,7 @@ abstract class SimpleWorker {
|
|||||||
$this->complete($task);
|
$this->complete($task);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!static::SUPPORT_MULTIPLE_INSTANCES) {
|
$this->stopProgress($task);
|
||||||
$this->stopProgress($task);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (bool)$completed;
|
return (bool)$completed;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user