purge_queue: Allow purging Tornado-consumed queues.

These are the exceptions to the rule that our queues correspond to
queue-processor workers.

Purging `notify_tornado` in particular is a useful workaround right
now for some error spew in the dev environment.
This commit is contained in:
Greg Price 2017-11-29 14:44:53 -08:00
parent b2cb443d24
commit fe979af822
1 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,8 @@ class Command(BaseCommand):
raise CommandError("Missing queue_name argument!")
else:
queue_name = options['queue_name']
if queue_name not in get_active_worker_queues():
if queue_name not in ['notify_tornado', 'tornado_return',
] + get_active_worker_queues():
raise CommandError("Unknown queue %s" % (queue_name,))
print("Purging queue %s" % (queue_name,))