Skip to content

Commit

Permalink
Add createdOn index
Browse files Browse the repository at this point in the history
  • Loading branch information
dawnerd committed Dec 4, 2018
1 parent 8dc4214 commit 094ce18
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class Queue extends EventEmitter {
this.conn = await MongoClient.connect(this.mongoUrl);
this.db = await this.conn.collection(this.collectionName);
this.db.createIndex({ status: 1, priority: 1, startTime: 1 }, { background: true });
this.db.createIndex({ createdOn: 1 }, { background: true });
}
this.exiting = false;
}
Expand Down

0 comments on commit 094ce18

Please sign in to comment.