Commit 2225b91a authored by lukas.burgey's avatar lukas.burgey
Browse files

Merge branch 'dev'

Merging an urgent fix
parents 04fea28f 90238dc4
Pipeline #81685 passed with stage
in 1 minute and 3 seconds
...@@ -40,17 +40,6 @@ class RabbitMQInstance: ...@@ -40,17 +40,6 @@ class RabbitMQInstance:
or os.path.basename(sys.argv[0]) in ('pytest', 'py.test') or os.path.basename(sys.argv[0]) in ('pytest', 'py.test')
) )
def _init_exchanges(self, channel):
# this is no error
for exchange in self.exchanges:
channel.exchange_declare(
exchange=exchange,
durable=True, # so exchange survive a broker restart
auto_delete=False,
exchange_type='topic',
)
@property @property
def _params(self): def _params(self):
# we set NO port here, we use the default (probably 5672) # we set NO port here, we use the default (probably 5672)
...@@ -64,6 +53,20 @@ class RabbitMQInstance: ...@@ -64,6 +53,20 @@ class RabbitMQInstance:
), ),
) )
def __init__(self):
# always initialize
self.initialize()
def _init_exchanges(self, channel):
# this is no error
for exchange in self.exchanges:
channel.exchange_declare(
exchange=exchange,
durable=True, # so exchange survive a broker restart
auto_delete=False,
exchange_type='topic',
)
def __str__(self): def __str__(self):
return self.host return self.host
...@@ -101,6 +104,7 @@ class RabbitMQInstance: ...@@ -101,6 +104,7 @@ class RabbitMQInstance:
# close channel and connection # close channel and connection
connection.close() connection.close()
# PUBLIC API # PUBLIC API
# called on client registration to make sure the exchanges exists # called on client registration to make sure the exchanges exists
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment