There was an error while loading. Please reload this page.
2 parents 728c2bd + f1c4acd commit 9c4f913Copy full SHA for 9c4f913
1 file changed
mrq/basetasks/utils.py
@@ -38,9 +38,6 @@ def build_query(self):
38
if self.params.get("id"):
39
query["_id"] = ObjectId(self.params.get("id"))
40
41
- if current_job and current_job.data.get("datequeued"):
42
- query["datequeued"] = {"$lte": current_job.data["datequeued"]}
43
-
44
# TODO use redis for queue
45
for k in [
46
"queue",
@@ -62,6 +59,9 @@ def build_query(self):
62
59
63
60
for key in params_dict:
64
61
query["params.%s" % key] = params_dict[key]
+
+ if current_job and "_id" not in query:
+ query["_id"] = {"$lte": current_job.id}
65
66
return query
67
0 commit comments