You are here

public function ReliablePredis::deleteItem in Redis 8

Deletes a finished item from the queue.

Parameters

$item: The item returned by \Drupal\Core\Queue\QueueInterface::claimItem().

Overrides QueueInterface::deleteItem

File

src/Queue/ReliablePredis.php, line 114

Class

ReliablePredis
Redis queue implementation using Predis library backend.

Namespace

Drupal\redis\Queue

Code

public function deleteItem($item) {
  $this->client
    ->pipeline()
    ->lrem($this->claimedListKey, -1, $item->qid)
    ->lrem($this->availableListKey, -1, $item->qid)
    ->hdel($this->availableItems, $item->qid)
    ->execute();
}