Remove check that sending queue is deleted at

[MAILPOET-4366]
This commit is contained in:
Jan Lysý
2022-08-10 13:28:14 +02:00
committed by Veljko V
parent a39b73041c
commit 77eaa7e710
2 changed files with 2 additions and 4 deletions

View File

@@ -135,7 +135,6 @@ class ScheduledTasksRepository extends Repository {
->where('st.type = :type') ->where('st.type = :type')
->andWhere('st.status IS NULL') ->andWhere('st.status IS NULL')
->andWhere('st.deletedAt IS NULL') ->andWhere('st.deletedAt IS NULL')
->andWhere('sq.deletedAt IS NULL')
->orderBy('st.priority', 'ASC') ->orderBy('st.priority', 'ASC')
->addOrderBy('st.updatedAt', 'ASC') ->addOrderBy('st.updatedAt', 'ASC')
->setMaxResults($limit) ->setMaxResults($limit)

View File

@@ -76,9 +76,8 @@ class ScheduledTasksRepositoryTest extends \MailPoetTest {
// deleted task // deleted task
$task = $this->scheduledTaskFactory->create(ScheduledTaskEntity::TYPE_SENDING, null, Carbon::now()->subDay(), Carbon::now()); $task = $this->scheduledTaskFactory->create(ScheduledTaskEntity::TYPE_SENDING, null, Carbon::now()->subDay(), Carbon::now());
$this->sendingQueueFactory->create($task); $this->sendingQueueFactory->create($task);
// deleted sending queue // without sending queue
$task = $this->scheduledTaskFactory->create(ScheduledTaskEntity::TYPE_SENDING, null, Carbon::now()->subDay()); $this->scheduledTaskFactory->create(ScheduledTaskEntity::TYPE_SENDING, null, Carbon::now()->subDay());
$this->sendingQueueFactory->create($task, null, Carbon::now());
// scheduled in future // scheduled in future
$task = $this->scheduledTaskFactory->create(ScheduledTaskEntity::TYPE_SENDING, ScheduledTaskEntity::STATUS_COMPLETED, Carbon::now()->addDay()); $task = $this->scheduledTaskFactory->create(ScheduledTaskEntity::TYPE_SENDING, ScheduledTaskEntity::STATUS_COMPLETED, Carbon::now()->addDay());
$this->sendingQueueFactory->create($task); $this->sendingQueueFactory->create($task);