public function ReliablePredis::deleteQueue in Redis 8
Deletes a queue and every item in the queue.
Overrides QueueInterface::deleteQueue
File
- src/
Queue/ ReliablePredis.php, line 125
Class
- ReliablePredis
- Redis queue implementation using Predis library backend.
Namespace
Drupal\redis\QueueCode
public function deleteQueue() {
// TODO: Fixme
$keys_to_remove = [
$this->claimedListKey,
$this->availableListKey,
$this->availableItems,
$this->incrementCounterKey,
];
foreach ($this->client
->keys($this->leasedKeyPrefix . '*') as $key) {
$keys_to_remove[] = $key;
}
$this->client
->del($keys_to_remove);
}