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):
return ret
@register_wamp('v1.config.configuration.server.updated', None, database=True)
async def update_configuration(self, cursor, server_id, deploy):
try:
configuration = await self.call('v1.config.configuration.server.get', server_id=server_id, deploy=deploy)
except:
if DEBUG:
if deploy:
print(f'No configuration available for server {server_id}')
else:
print(f'No undeployed configuration available for server {server_id}')
return
self.server.update_configuration(cursor, server_id, configuration['configuration'], deploy=deploy)
self.publish('v1.server.configuration.updated', server_id=server_id, deploy=deploy)
async def update_configuration(self, cursor, servers_id, deploy):
new_servers_id = []
for server_id in servers_id:
try:
configuration = await self.call('v1.config.configuration.server.get', server_id=server_id, deploy=deploy)
self.server.update_configuration(cursor, server_id, configuration['configuration'], deploy=deploy)
new_servers_id.append(server_id)
except Exception as err:
if DEBUG:
if deploy:
print(f'No configuration available for server {server_id}: {err}')
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)
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