| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Note that there is also a timeout for acquire, which gets used by release then also: https://github.com/MagicStack/asyncpg/blob/92c2d81256a1efd8cab12c0118d74ccd1c18131b/asyncpg/pool.py#L560-L564 |
Sorry, something went wrong.
|
This is a good call yup. |
Sorry, something went wrong.
This is recommended by asyncpg [1]. 1: https://github.com/MagicStack/asyncpg/blob/92c2d81256a1efd8cab12c0118d74ccd1c18131b/asyncpg/pool.py#L655-L656
There was a problem hiding this comment.
Hey @blueyed I can take care of finishing this PR if you don't have time right now. WDYT?
Sorry, something went wrong.
| async def disconnect(self) -> None: | ||
| assert self._pool is not None, "DatabaseBackend is not running" | ||
| await self._pool.close() | ||
| await asyncio.wait_for(self._pool.close(), timeout=30) |
There was a problem hiding this comment.
As @tomchristie wrote, it is a good idea to make the timeout configurable, otherwise, 30 seconds can be too much for everybody.
Sorry, something went wrong.
Sure, please go ahead. |
Sorry, something went wrong.
|
Any progress on this? |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is recommended by asyncpg [1].
1: https://github.com/MagicStack/asyncpg/blob/92c2d81256a1efd8cab12c0118d74ccd1c18131b/asyncpg/pool.py#L655-L656