mirror of
https://github.com/zulip/zulip.git
synced 2026-07-15 21:03:26 +08:00
Make the purge_queue management command more efficient
Before we were removing items individually from the queue. We now directly use RabbitMQ's queue purging mechanism. (imported from commit 62ab52c724c5a221b4c81a967154a4046a579f84)
This commit is contained in:
parent
32da8ecff4
commit
8aa2c7b547
@ -14,4 +14,6 @@ class Command(BaseCommand):
|
||||
|
||||
queue_name = args[0]
|
||||
queue = SimpleQueueClient()
|
||||
queue.drain_queue(queue_name)
|
||||
queue.ensure_queue(queue_name, lambda: None)
|
||||
queue.channel.queue_purge(queue_name)
|
||||
print "Done"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user