You are here

public function QueueWorker::deleteQueue 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::deleteQueue()

Return value

$this

1 call to QueueWorker::deleteQueue()
QueueWorker::rebuildQueue in src/Queue/QueueWorker.php

File

src/Queue/QueueWorker.php, line 353

Class

QueueWorker

Namespace

Drupal\simple_sitemap\Queue

Code

public function deleteQueue() : QueueWorker {
  $this->queue
    ->deleteQueue();
  SimpleSitemap::purgeContent(NULL, SimpleSitemap::FETCH_BY_STATUS_UNPUBLISHED);
  $this->state
    ->set('simple_sitemap.queue_items_initial_amount', 0);
  $this->state
    ->delete('simple_sitemap.queue_stashed_results');
  $this
    ->resetWorker();
  return $this;
}