美文网首页
pymongo monitor thread

pymongo monitor thread

作者: Yves_lau | 来源:发表于2015-12-09 14:30 被阅读46次

Note
Instances of MongoReplicaSetClient
start a background task to monitor the state of the replica set. This allows it to quickly respond to changes in replica set configuration. Before discarding an instance of MongoReplicaSetClient
make sure you call close()
to ensure that the monitor task is cleanly shut down.

PyMongo implements a PeriodicExecutor
for two purposes: as the background thread for Monitor
, and to regularly check if there are OP_KILL_CURSORS
messages that must be sent to the server.

http://api.mongodb.org/python/current/developer/periodic_executor.html

相关文章

网友评论

      本文标题:pymongo monitor thread

      本文链接:https://www.haomeiwen.com/subject/ugoehttx.html