You are here

public function QueueWorker::getStashedResultCount in Simple XML sitemap 8.3

Same name and namespace in other branches
  1. 4.x src/Queue/QueueWorker.php \Drupal\simple_sitemap\Queue\QueueWorker::getStashedResultCount()

Return value

int

1 call to QueueWorker::getStashedResultCount()
QueueWorker::generationInProgress in src/Queue/QueueWorker.php

File

src/Queue/QueueWorker.php, line 432

Class

QueueWorker

Namespace

Drupal\simple_sitemap\Queue

Code

public function getStashedResultCount() {
  $results = $this->state
    ->get('simple_sitemap.queue_stashed_results', []);
  return (!empty($results['results']) ? count($results['results']) : 0) + (!empty($results['processed_results']) ? count($results['processed_results']) : 0);
}