Return a connection to the loving hands of its pool. Use this function only paired with a `getconn()`. You don't need to use it if you use the much more comfortable `connection()` context manager.
(self, conn: ACT)
| 355 | self.run_task(AddConnection(self, growing=True)) |
| 356 | |
| 357 | async def putconn(self, conn: ACT) -> None: |
| 358 | """Return a connection to the loving hands of its pool. |
| 359 | |
| 360 | Use this function only paired with a `getconn()`. You don't need to use |
| 361 | it if you use the much more comfortable `connection()` context manager. |
| 362 | """ |
| 363 | # Quick check to discard the wrong connection |
| 364 | self._check_pool_putconn(conn) |
| 365 | |
| 366 | logger.info("returning connection to %r", self.name) |
| 367 | if await self._maybe_close_connection(conn): |
| 368 | return |
| 369 | |
| 370 | await self._putconn(conn, from_getconn=False) |
| 371 | |
| 372 | async def drain(self) -> None: |
| 373 | """ |
no test coverage detected