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

Method open

pymongo/periodic_executor.py:63–70  ·  view source on GitHub ↗

Start. Multiple calls have no effect.

(self)

Source from the content-addressed store, hash-verified

61 return f"<{self.__class__.__name__}(name={self._name}) object at 0x{id(self):x}>"
62
63 def open(self) -> None:
64 """Start. Multiple calls have no effect."""
65 self._stopped = False
66
67 if self._task is None or (
68 self._task.done() and not self._task.cancelled() and not self._task.cancelling() # type: ignore[unused-ignore, attr-defined]
69 ):
70 self._task = create_task(self._run(), name=self._name)
71
72 def close(self, dummy: Any = None) -> None:
73 """Stop. To restart, call open().

Callers 1

__init__Method · 0.95

Calls 4

_runMethod · 0.95
create_taskFunction · 0.90
cancelledMethod · 0.80
cancellingMethod · 0.80

Tested by

no test coverage detected