MCPcopy
hub / github.com/scrapy/scrapy / _init_engine

Method _init_engine

scrapy/commands/shell.py:108–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106 self._start_crawler_thread()
107
108 async def _init_engine() -> None:
109 # We may need to wait until some parts of start_async() have
110 # finished, which may need a special event in the engine and may
111 # wait until https://github.com/scrapy/scrapy/issues/6916
112 crawler.engine = crawler._create_engine()
113 loop.create_task(
114 crawler.engine.start_async(_start_request_processing=False)
115 )
116
117 future = asyncio.run_coroutine_threadsafe(_init_engine(), loop)
118 future.result()

Callers

nothing calls this directly

Calls 2

_create_engineMethod · 0.80
start_asyncMethod · 0.80

Tested by

no test coverage detected