public function Redis_Queue_PhpRedis::deleteItem in Redis 7.2
Same name and namespace in other branches
- 7.3 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();
}