There was an error while loading. Please reload this page.
1 parent 7180bb6 commit f1c4acdCopy full SHA for f1c4acd
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:
42
- query["_id"] = {"$lte": current_job.id}
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