Skip to content

Commit 7180bb6

Browse files
author
maelorn
committed
fix task cancelation
1 parent 5737a6e commit 7180bb6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

mrq/basetasks/utils.py

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

41-
if current_job and current_job.data.get("datequeued"):
42-
query["datequeued"] = {"$lte": current_job.data["datequeued"]}
41+
if current_job:
42+
query["_id"] = {"$lte": current_job.id}
4343

4444
# TODO use redis for queue
4545
for k in [

0 commit comments

Comments
 (0)