MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / discover

Function discover

test/utils.py:107–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105
106 # Run hello until we have connected to each host at least once.
107 def discover():
108 i = 0
109 while i < 100 and connected_host_list != target_host_list:
110 hello: dict = client.admin.command(
111 HelloCompat.LEGACY_CMD, read_preference=ReadPreference.SECONDARY
112 )
113 connected_host_list.update([hello["me"]])
114 i += 1
115 return connected_host_list
116
117 try:
118

Callers 1

predicateFunction · 0.70

Calls 2

commandMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected