You are here

protected function Cron::getQueue in Organic groups 8

Returns the queue of orphans to delete.

Return value

\Drupal\Core\Queue\QueueInterface The queue.

Overrides OgDeleteOrphansBase::getQueue

File

src/Plugin/OgDeleteOrphans/Cron.php, line 43

Class

Cron
Performs a cron deletion of orphans.

Namespace

Drupal\og\Plugin\OgDeleteOrphans

Code

protected function getQueue() {

  // By design, every QueueWorker is executed on every cron run and will
  // start processing its designated queue. To make sure that our DeleteOrphan
  // queue worker will not start processing orphans that have been registered
  // by another plugin (e.g. the Batch plugin) we are using a dedicated queue.
  return $this->queueFactory
    ->get('og_orphaned_group_content_cron', TRUE);
}