MCPcopy Create free account
hub / github.com/apify/crawlee-python / __aenter__

Method __aenter__

src/crawlee/events/_event_manager.py:104–111  ·  view source on GitHub ↗

Initialize the event manager upon entering the async context.

(self)

Source from the content-addressed store, hash-verified

102 return self._active_ref_count > 0
103
104 async def __aenter__(self) -> EventManager:
105 """Initialize the event manager upon entering the async context."""
106 self._active_ref_count += 1
107 if self._active_ref_count > 1:
108 return self
109
110 self._emit_persist_state_event_rec_task.start()
111 return self
112
113 async def __aexit__(
114 self,

Callers

nothing calls this directly

Calls 1

startMethod · 0.45

Tested by

no test coverage detected