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')
->andWhere('st.status IS NULL')
->andWhere('st.deletedAt IS NULL')
->andWhere('sq.deletedAt IS NULL')
->orderBy('st.priority', 'ASC')
->addOrderBy('st.updatedAt', 'ASC')
->setMaxResults($limit)

View File

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