Rotate sending queues

This should prevent sending queues to be stuck when a newsletter cannot be send.

[MAILPOET-1391]
This commit is contained in:
Pavel Dohnal
2018-06-05 11:05:59 +01:00
parent b8ce6ff88c
commit 2c290c6e4c
4 changed files with 42 additions and 2 deletions

View File

@@ -34,6 +34,7 @@ class SendingQueue {
$this->enforceSendingAndExecutionLimits();
foreach(self::getRunningQueues() as $queue) {
if(!$queue instanceof SendingTask) continue;
ScheduledTaskModel::touchAllByIds(array($queue->task_id));
$newsletter = $this->newsletter_task->getNewsletterFromQueue($queue);
if(!$newsletter) {