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

Method stale

pymongo/synchronous/pool.py:686–688  ·  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

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

Callers 3

stale_generationMethod · 0.45
stale_generationMethod · 0.45
stale_generationMethod · 0.45

Calls 1

getMethod · 0.95

Tested by

no test coverage detected