diff --git a/pkg/mongodb/MongodbContext.php b/pkg/mongodb/MongodbContext.php index 968c98b1e..e6f5a579c 100644 --- a/pkg/mongodb/MongodbContext.php +++ b/pkg/mongodb/MongodbContext.php @@ -158,6 +158,7 @@ public function getConfig(): array public function createCollection(): void { $collection = $this->getCollection(); + $collection->createIndex(['queue' => 1], ['name' => 'enqueue_queue']); $collection->createIndex(['priority' => -1, 'published_at' => 1], ['name' => 'enqueue_priority']); $collection->createIndex(['delayed_until' => 1], ['name' => 'enqueue_delayed']); }