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 @@ -435,14 +435,17 @@ async def get_rsyncer_info(
435435 select (RsyncInstance ).where (RsyncInstance .session_id == session_id )
436436 ).all ()
437437 if machine_config .instrument_server_url :
438- async with lock :
439- token = instrument_server_tokens [session_id ]["access_token" ]
440- async with aiohttp .ClientSession () as clientsession :
441- async with clientsession .get (
442- f"{ machine_config .instrument_server_url } /sessions/{ sanitise (str (session_id ))} /rsyncer_info" ,
443- headers = {"Authorization" : f"Bearer { token } " },
444- ) as resp :
445- data = await resp .json ()
438+ try :
439+ async with lock :
440+ token = instrument_server_tokens [session_id ]["access_token" ]
441+ async with aiohttp .ClientSession () as clientsession :
442+ async with clientsession .get (
443+ f"{ machine_config .instrument_server_url } /sessions/{ sanitise (str (session_id ))} /rsyncer_info" ,
444+ headers = {"Authorization" : f"Bearer { token } " },
445+ ) as resp :
446+ data = await resp .json ()
447+ except KeyError :
448+ data = []
446449 combined_data = []
447450 data_source_lookup = {d ["source" ]: d for d in data }
448451 for ri in rsync_instances :
You can’t perform that action at this time.
0 commit comments