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
2225b91a
Commit
2225b91a
authored
Apr 09, 2020
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
feudal/backend/brokers.py
View file @
2225b91a
...
@@ -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
...
...
Write
Preview
Supports
Markdown
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