-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create aiohttp.ClientSession once per application rather than per request #93
Comments
Also we need to keep in mind this https://docs.aiohttp.org/en/stable/client_advanced.html#graceful-shutdown |
Fix once beda-software#93 is done
* Add pyproject.toml * Remove setup files * Remove unnecessary tables in the pyproject.toml * Move tox config to pyproject.toml * Add build workflow * Add Pipfile * Update aidbox launch config * Skip aiohttp.request mocking tests Fix once #93 is done * Remove pytest-mock * Add mised import to test * Update build workflow config * Remove python required version in Pipfile * Add docker services to build workflow * Pass env vars for Aidbox container * Fix typo in the build config * Fix typoes * Disable aidbox healthcheck service * Remove services description * Move test command to the shell script * Remove setup python step
Hello, |
In the
AsyncClient._do_request
we create theaiohttp.ClientSession
instance for every single request (fhir-py/fhirpy/base/lib.py
Line 124 in e841065
Maybe it's not a big problem but the aiohttp documentation says:
It makes sense to follow the recommendation above and provide the API for closing the session during the application cleanup.
The text was updated successfully, but these errors were encountered: