mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-24 10:24:13 +00:00
Document scrapy.crawler.Crawler.stop()
This commit is contained in:
parent
f4f2b1695c
commit
d7795484dc
@ -99,6 +99,8 @@ how you :ref:`configure the downloader middlewares
|
||||
|
||||
Returns a deferred that is fired when the crawl is finished.
|
||||
|
||||
.. automethod:: stop
|
||||
|
||||
.. autoclass:: CrawlerRunner
|
||||
:members:
|
||||
|
||||
|
@ -111,6 +111,8 @@ class Crawler(object):
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def stop(self):
|
||||
"""Starts a graceful stop of the crawler and returns a deferred that is
|
||||
fired when the crawler is stopped."""
|
||||
if self.crawling:
|
||||
self.crawling = False
|
||||
yield defer.maybeDeferred(self.engine.stop)
|
||||
|
Loading…
x
Reference in New Issue
Block a user