fix: [ail sync] fix refresh_ail_instance_connection

pull/586/head
Terrtia 2021-11-30 15:38:55 +01:00
parent f597e1aaa2
commit 7f02ade6a7
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 12 additions and 0 deletions

View File

@ -265,6 +265,8 @@ def refresh_ail_instance_connection(ail_uuid):
clients_id = get_client_id_by_ail_uuid(ail_uuid) clients_id = get_client_id_by_ail_uuid(ail_uuid)
if clients_id: if clients_id:
clients_id = clients_id[0] clients_id = clients_id[0]
else:
client_id = None
launch_required = is_ail_instance_push_enabled(ail_uuid) launch_required = is_ail_instance_push_enabled(ail_uuid)
# relaunch # relaunch
@ -1176,6 +1178,16 @@ def add_ail_stream_to_sync_importer(ail_stream):
# # # #
#### AIL EXCHANGE FORMAT #### #### AIL EXCHANGE FORMAT ####
def is_valid_ail_exchange_format_json(json_obj):
try:
ail_stream = json.dumps(ail_stream)
except ValueError:
return False
return is_valid_ail_exchange_format(ail_stream)
def is_valid_ail_exchange_format(ail_stream):
pass
def create_ail_stream(Object): def create_ail_stream(Object):
ail_stream = {'format': 'ail', ail_stream = {'format': 'ail',
'version': 1, 'version': 1,