Skip to content

Commit 93e4c5f

Browse files
committed
fix predis hdel
1 parent 440d844 commit 93e4c5f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Handlers/PredisHandler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function later(QueueJob $queueJob, int $seconds): bool
9494
$queueJob->available_at = Time::now()->addSeconds($seconds)->timestamp;
9595

9696
if ($result = $this->predis->zadd("queues:{$queueJob->queue}:{$queueJob->priority}", [json_encode($queueJob) => $queueJob->available_at->timestamp])) {
97-
$this->predis->hdel("queues:{$queueJob->queue}::reserved", $queueJob->id);
97+
$this->predis->hdel("queues:{$queueJob->queue}::reserved", [$queueJob->id]);
9898
}
9999

100100
return $result > 0;
@@ -109,7 +109,7 @@ public function failed(QueueJob $queueJob, Throwable $err, bool $keepJob): bool
109109
$this->logFailed($queueJob, $err);
110110
}
111111

112-
return (bool) $this->predis->hdel("queues:{$queueJob->queue}::reserved", $queueJob->id);
112+
return (bool) $this->predis->hdel("queues:{$queueJob->queue}::reserved", [$queueJob->id]);
113113
}
114114

115115
/**
@@ -122,7 +122,7 @@ public function done(QueueJob $queueJob, bool $keepJob): bool
122122
$this->predis->lpush("queues:{$queueJob->queue}::done", [json_encode($queueJob)]);
123123
}
124124

125-
return (bool) $this->predis->hdel("queues:{$queueJob->queue}::reserved", $queueJob->id);
125+
return (bool) $this->predis->hdel("queues:{$queueJob->queue}::reserved", [$queueJob->id]);
126126
}
127127

128128
/**

0 commit comments

Comments
 (0)