Skip to content

Commit 2adc441

Browse files
committed
Better indices and not compound indices as before
1 parent 684379c commit 2adc441

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

mrq/worker.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ def ensure_indexes(self):
129129
[("datereported", 1)], background=False, expireAfterSeconds=3600)
130130

131131
self.mongodb_jobs.mrq_jobs.ensure_index(
132-
[("status", 1)], background=False)
132+
[("status", 1)], background=True)
133133
self.mongodb_jobs.mrq_jobs.ensure_index(
134-
[("path", 1), ("status", 1)], background=False)
134+
[("path", 1)], background=True)
135135
self.mongodb_jobs.mrq_jobs.ensure_index(
136-
[("worker", 1), ("status", 1)], background=False, sparse=True)
136+
[("worker", 1)], background=True, sparse=True)
137137
self.mongodb_jobs.mrq_jobs.ensure_index(
138-
[("queue", 1), ("status", 1)], background=False)
138+
[("queue", 1)], background=True)
139139
self.mongodb_jobs.mrq_jobs.ensure_index(
140140
[("dateexpires", 1)], sparse=True, background=False, expireAfterSeconds=0)
141141
self.mongodb_jobs.mrq_jobs.ensure_index(

0 commit comments

Comments
 (0)