You are here

public function QueueWorker::getStashedResultCount in Simple XML sitemap 4.x

Same name and namespace in other branches
  1. 8.3 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 407

Class

QueueWorker

Namespace

Drupal\simple_sitemap\Queue

Code

public function getStashedResultCount() : int {
  $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);
}