Commit c09b12b0 authored by Lionel Morin's avatar Lionel Morin

Merge branch 'updated_list' into 'develop'

updated are list

See merge request !15
parents 59ae4aaa 1dc7236d
Pipeline #865 passed with stage
in 0 seconds
...@@ -322,18 +322,21 @@ class ServerRunner(ZephirCommonController): ...@@ -322,18 +322,21 @@ class ServerRunner(ZephirCommonController):
return ret return ret
@register_wamp('v1.config.configuration.server.updated', None, database=True) @register_wamp('v1.config.configuration.server.updated', None, database=True)
async def update_configuration(self, cursor, server_id, deploy): async def update_configuration(self, cursor, servers_id, deploy):
try: new_servers_id = []
configuration = await self.call('v1.config.configuration.server.get', server_id=server_id, deploy=deploy) for server_id in servers_id:
except: try:
if DEBUG: configuration = await self.call('v1.config.configuration.server.get', server_id=server_id, deploy=deploy)
if deploy: self.server.update_configuration(cursor, server_id, configuration['configuration'], deploy=deploy)
print(f'No configuration available for server {server_id}') new_servers_id.append(server_id)
else: except Exception as err:
print(f'No undeployed configuration available for server {server_id}') if DEBUG:
return if deploy:
self.server.update_configuration(cursor, server_id, configuration['configuration'], deploy=deploy) print(f'No configuration available for server {server_id}: {err}')
self.publish('v1.server.configuration.updated', server_id=server_id, deploy=deploy) else:
print(f'No undeployed configuration available for server {server_id}: {err}')
if deploy and new_servers_id:
self.publish('v1.server.configuration.updated', servers_id=new_servers_id)
@register_wamp('v1.server.peer-connection.update', notification_uri=None, database=True) @register_wamp('v1.server.peer-connection.update', notification_uri=None, database=True)
async def update_peerconnection(self, cursor, serverid): async def update_peerconnection(self, cursor, serverid):
......
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