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

Method inc

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

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

Callers 1

_resetMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected