File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -456,14 +456,17 @@ async def get_rsyncer_info(
456456 select (RsyncInstance ).where (RsyncInstance .session_id == session_id )
457457 ).all ()
458458 if machine_config .instrument_server_url :
459- async with lock :
460- token = instrument_server_tokens [session_id ]["access_token" ]
461- async with aiohttp .ClientSession () as clientsession :
462- async with clientsession .get (
463- f"{ machine_config .instrument_server_url } /sessions/{ sanitise (str (session_id ))} /rsyncer_info" ,
464- headers = {"Authorization" : f"Bearer { token } " },
465- ) as resp :
466- data = await resp .json ()
459+ try :
460+ async with lock :
461+ token = instrument_server_tokens [session_id ]["access_token" ]
462+ async with aiohttp .ClientSession () as clientsession :
463+ async with clientsession .get (
464+ f"{ machine_config .instrument_server_url } /sessions/{ sanitise (str (session_id ))} /rsyncer_info" ,
465+ headers = {"Authorization" : f"Bearer { token } " },
466+ ) as resp :
467+ data = await resp .json ()
468+ except KeyError :
469+ data = []
467470 combined_data = []
468471 data_source_lookup = {d ["source" ]: d for d in data }
469472 for ri in rsync_instances :
You can’t perform that action at this time.
0 commit comments