Skip to content

Commit f1c4acd

Browse files
author
maelorn
committed
cancel edgecases
1 parent 7180bb6 commit f1c4acd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

mrq/basetasks/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ def build_query(self):
3838
if self.params.get("id"):
3939
query["_id"] = ObjectId(self.params.get("id"))
4040

41-
if current_job:
42-
query["_id"] = {"$lte": current_job.id}
43-
4441
# TODO use redis for queue
4542
for k in [
4643
"queue",
@@ -62,6 +59,9 @@ def build_query(self):
6259

6360
for key in params_dict:
6461
query["params.%s" % key] = params_dict[key]
62+
63+
if current_job and "_id" not in query:
64+
query["_id"] = {"$lte": current_job.id}
6565

6666
return query
6767

0 commit comments

Comments
 (0)