Skip to content

Commit

Permalink
fixed an error in query and test assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
ani2amigos committed Apr 15, 2024
1 parent 3e7e4b0 commit f6e3b27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Queue/Backend/Pdo/PdoQueueStoreAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function ack(MailJobInterface $mailJob)

$mailJob->incrementAttempt();
if($mailJob->getAttempt() > $config['max-attempts']){
$sqlText = 'DELETE FROM mail_queue WHERE id = :max_attempt;';
$sqlText = 'DELETE FROM mail_queue WHERE id = :id;';
$sql = sprintf($sqlText, $this->tableName);
$query = $this->getConnection()->getInstance()->prepare($sql);
$query->bindValue(':id', $mailJob->getId());
Expand Down
2 changes: 1 addition & 1 deletion tests/Queue/Backend/Pdo/PdoQueueStoreAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function testAcknowledgementToUpdateMailJobs()
$dequedMailJob->markAsNew();
$this->pdoQueueStore->ack($dequedMailJob);
sleep(1);
$this->assertTrue($this->pdoQueueStore->isEmpty() === false);
$this->assertTrue($this->pdoQueueStore->isEmpty() === true);
}

public function testBadMethodCallExceptionOnAck()
Expand Down

0 comments on commit f6e3b27

Please sign in to comment.