You are here

public function Redis_Queue_PhpRedis::deleteItem in Redis 7.3

Same name and namespace in other branches
  1. 7.2 lib/Redis/Queue/PhpRedis.php \Redis_Queue_PhpRedis::deleteItem()

Delete a finished item from the queue.

Parameters

$item: The item returned by DrupalQueueInterface::claimItem().

Overrides DrupalQueueInterface::deleteItem

File

lib/Redis/Queue/PhpRedis.php, line 74

Class

Redis_Queue_PhpRedis
@todo Set high expire value to the hash for rotation when memory is empty React upon cache clear all and rebuild path list?

Code

public function deleteItem($item) {
  $pipe = $this
    ->getClient()
    ->multi(Redis::PIPELINE);
  $pipe
    ->lrem($this
    ->getKeyForQueue(), $item->qid);
  $pipe
    ->lrem($this
    ->getKeyForClaimed(), $item->qid);
  $pipe
    ->hdel($this
    ->getKeyForData(), $item->qid);
  $pipe
    ->exec();
}