Log errors when saving sending task
[MAILPOET-3379]
This commit is contained in:
@@ -164,6 +164,14 @@ class Sending {
|
|||||||
public function save() {
|
public function save() {
|
||||||
$this->task->save();
|
$this->task->save();
|
||||||
$this->queue->save();
|
$this->queue->save();
|
||||||
|
$errors = $this->getErrors();
|
||||||
|
if ($errors) {
|
||||||
|
$loggerFactory = LoggerFactory::getInstance();
|
||||||
|
$loggerFactory->getLogger(LoggerFactory::TOPIC_NEWSLETTERS)->addError(
|
||||||
|
'error saving sending task',
|
||||||
|
['task_id' => $this->task->id, 'queue_id' => $this->queue->id, 'errors' => $errors]
|
||||||
|
);
|
||||||
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user