You are here

public function QueueMongodb::createQueue in MongoDB 8

Create a queue.

Overrides QueueInterface::createQueue

File

src/QueueMongodb.php, line 138
Contains \Drupal\mongodb\QueueMongodb

Class

QueueMongodb
MongoDB queue implementation.

Namespace

Drupal\mongodb

Code

public function createQueue() {
  $this
    ->mongoCollection()
    ->ensureIndex(array(
    'expire' => 1,
    'created' => 1,
  ));
}