Skip to content

Commit 2158f00

Browse files
author
Florian Perucki
committed
fix cancelling jobs on a subqueue
1 parent 042cc2b commit 2158f00

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mrq/basetasks/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def perform_action(self, action, query, destination_queue):
116116
# In this case we could also loose some jobs that were queued after
117117
# the MongoDB update. They will be "lost" and requeued later like the other case
118118
# after the Redis BLPOP
119-
if list(query.keys()) == ["queue"]:
119+
if list(query.keys()) == ["queue"] and isinstance(query["queue"], basestring):
120120
Queue(query["queue"]).empty()
121121

122122
elif action in ("requeue", "requeue_retry"):

0 commit comments

Comments
 (0)