Move exception handling from concrete workers into processTask() [MAILPOET-2385]
This commit is contained in:
@ -23,7 +23,14 @@ abstract class SingleInstanceSimpleWorker extends SimpleWorker {
|
||||
}
|
||||
|
||||
$this->startProgress($task);
|
||||
$completed = $this->processTaskStrategy($task);
|
||||
|
||||
try {
|
||||
$completed = $this->processTaskStrategy($task);
|
||||
} catch (\Exception $e) {
|
||||
$this->stopProgress($task);
|
||||
throw $e;
|
||||
}
|
||||
|
||||
if ($completed) {
|
||||
$this->complete($task);
|
||||
}
|
||||
|
Reference in New Issue
Block a user