MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / ready

Method ready

pymongo/asynchronous/pool.py:786–801  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

784 self.ntxns = 0
785
786 async def ready(self) -> None:
787 # Take the lock to avoid the race condition described in PYTHON-2699.
788 async with self.lock:
789 if self.state != PoolState.READY:
790 self.state = PoolState.READY
791 if self.enabled_for_cmap:
792 assert self.opts._event_listeners is not None
793 self.opts._event_listeners.publish_pool_ready(self.address)
794 if self.enabled_for_logging and _CONNECTION_LOGGER.isEnabledFor(logging.DEBUG):
795 _debug_log(
796 _CONNECTION_LOGGER,
797 message=_ConnectionStatusMessage.POOL_READY,
798 clientId=self._client_id,
799 serverHost=self.address[0],
800 serverPort=self.address[1],
801 )
802
803 @property
804 def closed(self) -> bool:

Callers 1

_process_changeMethod · 0.45

Calls 2

_debug_logFunction · 0.90
publish_pool_readyMethod · 0.80

Tested by

no test coverage detected