Skip to content

Commit a9fd485

Browse files
committed
Skip jobs that are already reserved when removing from queue
1 parent 7877c40 commit a9fd485

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Queue/MySqlQueue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public function dequeue($job_id)
179179
public function dequeueByType(string $type, array $properties = null): void
180180
{
181181
$conditions = [
182-
$this->connection->prepare('`type` = ?', $type),
182+
$this->connection->prepare('`type` = ? AND `reservation_key` IS NULL', $type),
183183
];
184184

185185
if ($properties) {

0 commit comments

Comments
 (0)