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