Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
feudal
feudalBackend
Commits
162f2077
Commit
162f2077
authored
Dec 18, 2017
by
Lukas Burgey
Browse files
Fix a bug in the clientapi pubsub
parent
176ff440
Changes
1
Hide whitespace changes
Inline
Side-by-side
django_backend/backend/clientapi/pubsub.py
View file @
162f2077
...
...
@@ -36,13 +36,13 @@ class PubSubConnection:
def
online_clients
(
self
,
service
):
rabbitmq
=
RabbitMQInstance
()
return
[
s
for
s
in
service
.
site
.
all
()
if
rabbitmq
.
is_client_connected
(
s
)]
return
[
s
ite
for
s
ite
in
service
.
site
.
all
()
if
rabbitmq
.
is_client_connected
(
s
ite
)]
def
publish_by_service
(
self
,
service
,
message
):
online_clients
=
self
.
online_clients
(
service
)
if
len
(
online_clients
)
>
0
:
if
online_clients
:
print
(
"Online clients for service {}: {}"
.
format
(
service
,
online_clients
,
...
...
@@ -51,7 +51,7 @@ class PubSubConnection:
print
(
"No clients online for service {}"
.
format
(
service
))
return
return
False
,
[]
self
.
connect
()
print
(
'Sent deployment update for service {}'
.
format
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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