MCPcopy
hub / github.com/scrapy/scrapy / stop

Method stop

scrapy/crawler.py:236–244  ·  view source on GitHub ↗

Start a graceful stop of the crawler and return a deferred that is fired when the crawler is stopped.

(self)

Source from the content-addressed store, hash-verified

234 return ExecutionEngine(self, lambda _: self.stop_async())
235
236 def stop(self) -> Deferred[None]:
237 """Start a graceful stop of the crawler and return a deferred that is
238 fired when the crawler is stopped."""
239 warnings.warn(
240 "Crawler.stop() is deprecated, use stop_async() instead",
241 ScrapyDeprecationWarning,
242 stacklevel=2,
243 )
244 return deferred_from_coro(self.stop_async())
245
246 async def stop_async(self) -> None:
247 """Start a graceful stop of the crawler and complete when the crawler is stopped.

Callers 4

_stop_reactorMethod · 0.45
_stop_dfdMethod · 0.45
_stop_dfdMethod · 0.45

Calls 2

stop_asyncMethod · 0.95
deferred_from_coroFunction · 0.90

Tested by

no test coverage detected