Move exception handling from concrete workers into processTask() [MAILPOET-2385]
This commit is contained in:
@@ -27,12 +27,7 @@ class WooCommerceSync extends SingleInstanceSimpleWorker {
|
||||
}
|
||||
|
||||
function processTaskStrategy(ScheduledTask $task) {
|
||||
try {
|
||||
$this->woocommerce_segment->synchronizeCustomers();
|
||||
} catch (\Exception $e) {
|
||||
$this->stopProgress($task);
|
||||
throw $e;
|
||||
}
|
||||
$this->woocommerce_segment->synchronizeCustomers();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user