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

Method stale

pymongo/asynchronous/pool.py:688–690  ·  view source on GitHub ↗

Return if the given generation for a given service_id is stale.

(self, gen: int, service_id: Optional[ObjectId])

Source from the content-addressed store, hash-verified

686 self._generations[service_id] += 1
687
688 def stale(self, gen: int, service_id: Optional[ObjectId]) -> bool:
689 """Return if the given generation for a given service_id is stale."""
690 return gen != self.get(service_id)
691
692
693class PoolState:

Callers 1

stale_generationMethod · 0.45

Calls 1

getMethod · 0.95

Tested by

no test coverage detected