Get the standalone, primary, or mongos pool.
(client: AsyncMongoClient)
| 40 | |
| 41 | |
| 42 | async def async_get_pool(client: AsyncMongoClient) -> Pool: |
| 43 | """Get the standalone, primary, or mongos pool.""" |
| 44 | topology = await client._get_topology() |
| 45 | server = await topology._select_server(writable_server_selector, _Op.TEST) |
| 46 | return server.pool |
| 47 | |
| 48 | |
| 49 | async def async_get_pools(client: AsyncMongoClient) -> list[Pool]: |