You are here

public function QueueService::numberOfItems in Purge 8.3

Retrieves the number of items in the queue.

Return value

int The number of items in the queue.

Overrides QueueServiceInterface::numberOfItems

1 call to QueueService::numberOfItems()
QueueService::commit in src/Plugin/Purge/Queue/QueueService.php
Commit all actions in the internal buffer to the queue.

File

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

Class

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

Namespace

Drupal\purge\Plugin\Purge\Queue

Code

public function numberOfItems() {
  $this
    ->commit(FALSE);
  $this
    ->initializeQueue();
  return $this->queue
    ->numberOfItems();
}