Commit 162f2077 authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Fix a bug in the clientapi pubsub

parent 176ff440
......@@ -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 [site
for site in service.site.all()
if rabbitmq.is_client_connected(site)]
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(
......
Markdown is supported
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