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

Function handler_2

tests/unit/crawlers/_basic/test_basic_crawler.py:2135–2143  ·  view source on GitHub ↗
(context: BasicCrawlingContext)

Source from the content-addressed store, hash-verified

2133
2134 @crawler_2.router.default_handler
2135 async def handler_2(context: BasicCrawlingContext) -> None:
2136 # Ensure that both handlers are running at the same time.
2137 await handler_barrier.wait()
2138 # Ensure that crawler_1 is finished and closed all active contexts.
2139 await finished_event.wait()
2140 # Check that event manager is active and can be used in the second crawler.
2141 event_manager = service_locator.get_event_manager()
2142
2143 await handler_call(event_manager.active)
2144
2145 await asyncio.gather(
2146 launch_crawler_1(),

Callers

nothing calls this directly

Calls 1

get_event_managerMethod · 0.80

Tested by

no test coverage detected