Skip to content
Snippets Groups Projects
Commit e04cfab2 authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Check connection before bind queue

parent 9c73d123
No related branches found
No related tags found
No related merge requests found
......@@ -84,6 +84,9 @@ class RCRMQ(object):
self, queue="", routing_key=None, durable=True, exclusive=False
):
if self._connection is None:
self.connect()
self._channel.queue_declare(
queue=queue, durable=durable, exclusive=exclusive
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment