我在 ec2 上有一个死节点。如何使用 pymongo 从代表集中删除死的次要?
{u'date': datetime.datetime(2012, 11, 16, 11, 53, 53),
u'members': [{u'_id': 0,
u'health': 1.0,
u'name': u'xxxxxxxxx:27017',
u'optime': Timestamp(1352810702, 1),
u'optimeDate': datetime.datetime(2012, 11, 13, 12, 45, 2),
u'self': True,
u'state': 1,
u'stateStr': u'PRIMARY',
u'uptime': 507560},
{u'_id': 1,
u'health': 1.0,
u'lastHeartbeat': datetime.datetime(2012, 11, 16, 11, 53, 51),
u'name': u'ffffffffff:27017',
u'optime': Timestamp(1352810702, 1),
u'optimeDate': datetime.datetime(2012, 11, 13, 12, 45, 2),
u'pingMs': 1,
u'state': 2,
u'stateStr': u'SECONDARY',
u'uptime': 163187},
{u'_id': 2,
u'errmsg': u'socket exception [CONNECT_ERROR] for jjjjjjjj:27017',
u'health': 0.0,
u'lastHeartbeat': datetime.datetime(2012, 11, 16, 11, 53, 14),
u'name': u'jjjjjjjjjj:27017',
u'optime': Timestamp(1352810702, 1),
u'optimeDate': datetime.datetime(2012, 11, 13, 12, 45, 2),
u'pingMs': 0,
u'state': 8,
u'stateStr': u'(not reachable/healthy)',
u'uptime': 0}],
u'myState': 1,
u'ok': 1.0,
u'set': u'heythat'}