You are here

public function QueueService::emptyQueue in Purge 8.3

Empty the entire queue.

Overrides QueueServiceInterface::emptyQueue

1 call to QueueService::emptyQueue()
QueueService::setPluginsEnabled in src/Plugin/Purge/Queue/QueueService.php
Set the plugins used by the service and reload it.

File

src/Plugin/Purge/Queue/QueueService.php, line 347

Class

QueueService
Provides the service that lets invalidations interact with a queue backend.

Namespace

Drupal\purge\Plugin\Purge\Queue

Code

public function emptyQueue() {
  $this
    ->initializeQueue();
  $this->buffer
    ->deleteEverything();
  $this->queue
    ->deleteQueue();
  $this->purgeQueueStats
    ->numberOfItems()
    ->set(0);
  $this->logger
    ->debug("emptied the queue.");
}