public function ReliablePredis::releaseItem in Redis 8
Releases an item that the worker could not process.
Another worker can come in and process it before the timeout expires.
Parameters
$item: The item returned by \Drupal\Core\Queue\QueueInterface::claimItem().
Return value
bool TRUE if the item has been released, FALSE otherwise.
Overrides QueueInterface::releaseItem
File
- src/
Queue/ ReliablePredis.php, line 104
Class
- ReliablePredis
- Redis queue implementation using Predis library backend.
Namespace
Drupal\redis\QueueCode
public function releaseItem($item) {
$this->client
->pipeline()
->lrem($this->claimedListKey, -1, $item->qid)
->lpush($this->availableListKey, $item->qid)
->execute();
}