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

Method check_out

test/test_connection_monitoring.py:125–134  ·  view source on GitHub ↗

Run the 'checkOut' operation.

(self, op)

Source from the content-addressed store, hash-verified

123 )
124
125 def check_out(self, op):
126 """Run the 'checkOut' operation."""
127 label = op["label"]
128 with self.pool.checkout() as conn:
129 # Call 'pin_cursor' so we can hold the socket.
130 conn.pin_cursor()
131 if label:
132 self.labels[label] = conn
133 else:
134 self.addCleanup(conn.close_conn, None)
135
136 def check_in(self, op):
137 """Run the 'checkIn' operation."""

Callers

nothing calls this directly

Calls 3

addCleanupMethod · 0.80
checkoutMethod · 0.45
pin_cursorMethod · 0.45

Tested by

no test coverage detected