This should be pretty straight forward.
The first thing to do is add an ExecutionTimeout class to pymongo.errors. It should inherit from OperationFailure.
The next thing is to check for error code 16986 if there is a failure in pymongo.helpers._check_command_response or pymongo.helpers._unpack_response, raising ExecutionTimeout.
This is a MongoDB 2.6 feature so a recent build of MongoDB from github master is required.
- depends on
-
SERVER-2212 Server automatically abort queries/commands after user-specified time limit
- Closed
- is depended on by
-
DRIVERS-99 Add support for server automatically aborting queries/commands after user-specified time limit
- Closed