-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
CSOT already works in motor as documented in pymongo: https://pymongo.readthedocs.io/en/latest/examples/timeouts.html#pymongo-timeout-is-asyncio-safe
timeout() is asyncio safe; the timeout only applies to current Task and multiple Tasks can configure different timeouts concurrently. timeout() can be used identically in Motor, for example:
import motor.motor_asyncio client = motor.motor_asyncio.AsyncIOMotorClient() coll = client.test.test with pymongo.timeout(10): await coll.insert_one({"name": "Nunu"}) await coll.find_one({"name": "Nunu"})
However we probably want to add documentation examples in motor itself.
- related to
-
PYTHON-2550 Client Side Operations Timeout
- Released
-
MOTOR-663 Client Side Operations Timeout
- Development Complete