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

Method pin

pymongo/asynchronous/client_session.py:451–456  ·  view source on GitHub ↗
(self, server: Server, conn: AsyncConnection)

Source from the content-addressed store, hash-verified

449 return None
450
451 def pin(self, server: Server, conn: AsyncConnection) -> None:
452 self.sharded = True
453 self.pinned_address = server.description.address
454 if server.description.server_type == SERVER_TYPE.LoadBalancer:
455 conn.pin_txn()
456 self.conn_mgr = _ConnectionManager(conn, False)
457
458 async def unpin(self) -> None:
459 self.pinned_address = None

Callers 1

_pinMethod · 0.45

Calls 2

_ConnectionManagerClass · 0.90
pin_txnMethod · 0.45

Tested by

no test coverage detected