Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
feudal
feudalBackend
Commits
90238dc4
Commit
90238dc4
authored
Apr 09, 2020
by
lukas.burgey
Browse files
Fix the broker initialization
parent
78a612b9
Pipeline
#81683
passed with stage
in 1 minute and 4 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
feudal/backend/brokers.py
View file @
90238dc4
...
...
@@ -40,17 +40,6 @@ class RabbitMQInstance:
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
def
_params
(
self
):
# we set NO port here, we use the default (probably 5672)
...
...
@@ -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
):
return
self
.
host
...
...
@@ -101,6 +104,7 @@ class RabbitMQInstance:
# close channel and connection
connection
.
close
()
# PUBLIC API
# called on client registration to make sure the exchanges exists
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment