Commit f1aa3d1d authored by Alexandre Vincent's avatar Alexandre Vincent
Browse files

fix shutdown event

parent e212b5de
Pipeline #93545 failed with stages
in 33 minutes and 30 seconds
......@@ -157,12 +157,12 @@ async def startup_event():
async def shutdown_event():
# clients close
storage_client = await app_injector.get(StorageRecordServiceClient)
if storage_client is not None:
if storage_client is not None and hasattr(storage_client, 'api_client'):
await storage_client.api_client.close()
search_client = await app_injector.get(SearchServiceClient)
if search_client is not None:
await storage_client.api_client.close()
if search_client is not None and hasattr(search_client, 'api_client'):
await search_client.api_client.close()
await get_http_client_session().close()
await DaskClient.close()
Supports Markdown
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