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

Method inc

pymongo/synchronous/pool.py:677–684  ·  view source on GitHub ↗

Increment the generation for the given service_id.

(self, service_id: Optional[ObjectId])

Source from the content-addressed store, hash-verified

675 return self._generation
676
677 def inc(self, service_id: Optional[ObjectId]) -> None:
678 """Increment the generation for the given service_id."""
679 self._generation += 1
680 if service_id is None:
681 for service_id in self._generations:
682 self._generations[service_id] += 1
683 else:
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."""

Callers 1

_resetMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected