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

Method get_event_manager

src/crawlee/_service_locator.py:63–74  ·  view source on GitHub ↗

Get the event manager.

(self)

Source from the content-addressed store, hash-verified

61 self._configuration = configuration
62
63 def get_event_manager(self) -> EventManager:
64 """Get the event manager."""
65 if self._event_manager is None:
66 logger.debug('No event manager set, implicitly creating and using default LocalEventManager.')
67 if self._configuration is None:
68 logger.warning(
69 'Implicit creation of event manager will implicitly set configuration as side effect. '
70 'It is advised to explicitly first set the configuration instead.'
71 )
72 self._event_manager = LocalEventManager().from_config(config=self._configuration)
73
74 return self._event_manager
75
76 def set_event_manager(self, event_manager: EventManager) -> None:
77 """Set the event manager.

Callers 15

initializeMethod · 0.80
teardownMethod · 0.80
__aenter__Method · 0.80
__aexit__Method · 0.80
__init__Method · 0.80
_run_crawlerMethod · 0.80
_crawler_state_taskMethod · 0.80

Calls 2

LocalEventManagerClass · 0.90
from_configMethod · 0.45