Ensure newsletter has state sending when resuming sending

[MAILPOET-2819]
This commit is contained in:
Rostislav Wolny
2020-03-30 17:22:05 +02:00
committed by Veljko V
parent 698e9f00c1
commit 317257bfc4

View File

@@ -59,6 +59,7 @@ class SendingQueue extends Model {
if ($this->countProcessed === $this->countTotal) {
return $this->complete();
} else {
$this->newsletter()->findOne()->setStatus(Newsletter::STATUS_SENDING);
return $this->task()->findOne()->resume();
}
}