mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
queue: Log how long it takes to connect to rabbitmq.
(imported from commit be3cd9da5e7c213cfed62feda2e676038ade57a6)
This commit is contained in:
@@ -25,9 +25,10 @@ class SimpleQueueClient(object):
|
|||||||
self._connect()
|
self._connect()
|
||||||
|
|
||||||
def _connect(self):
|
def _connect(self):
|
||||||
|
start = time.time()
|
||||||
self.connection = pika.BlockingConnection(self._get_parameters())
|
self.connection = pika.BlockingConnection(self._get_parameters())
|
||||||
self.channel = self.connection.channel()
|
self.channel = self.connection.channel()
|
||||||
self.log.info('SimpleQueueClient connected')
|
self.log.info('SimpleQueueClient connected (connecting took %.3fs)' % (time.time() - start,))
|
||||||
|
|
||||||
def _reconnect(self):
|
def _reconnect(self):
|
||||||
self.connection = None
|
self.connection = None
|
||||||
|
|||||||
Reference in New Issue
Block a user