mirror of
https://github.com/zulip/zulip.git
synced 2025-11-18 04:43:58 +00:00
queue: Get rid of lazy initialization in SimpleQueue
Instead make it a singleton with a get_instance() class method. (imported from commit e32cabf77b43361e74a11a23bba3a6d9fb32f82f)
This commit is contained in:
@@ -10,7 +10,7 @@ class Command(BaseCommand):
|
||||
help = "Process UserActivity log messages."
|
||||
|
||||
def handle(self, *args, **options):
|
||||
activity_queue = SimpleQueueClient()
|
||||
activity_queue = SimpleQueueClient.get_instance()
|
||||
|
||||
def callback(ch, method, properties, event):
|
||||
print " [x] Received %r" % (event,)
|
||||
|
||||
Reference in New Issue
Block a user