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

Method idle_time_seconds

pymongo/asynchronous/pool.py:607–609  ·  view source on GitHub ↗

Seconds since this socket was last checked into its pool.

(self)

Source from the content-addressed store, hash-verified

605 self.is_writable = is_writable
606
607 def idle_time_seconds(self) -> float:
608 """Seconds since this socket was last checked into its pool."""
609 return time.monotonic() - self.last_checkin_time
610
611 async def _raise_connection_failure(self, error: BaseException) -> NoReturn:
612 # Catch *all* exceptions from socket methods and close the socket. In

Callers 2

remove_stale_socketsMethod · 0.45
_perishedMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected