mirror of https://github.com/scrapy/scrapy.git
removed documentation about ugly DontCloseDomain exception (which will be removed in the future)
This commit is contained in:
parent
74f706b356
commit
ead8cb9fac
|
|
@ -14,15 +14,6 @@ Built-in Exceptions reference
|
|||
|
||||
Here's a list of all exceptions included in Scrapy and their usage.
|
||||
|
||||
DontCloseDomain
|
||||
---------------
|
||||
|
||||
.. exception:: DontCloseDomain
|
||||
|
||||
This exception can be raised by any handler of the :signal:`domain_idle` signal
|
||||
to avoid the domain from being closed at this time, and wait for the next idle
|
||||
state.
|
||||
|
||||
DropItem
|
||||
--------
|
||||
|
||||
|
|
|
|||
|
|
@ -77,22 +77,24 @@ domain_idle
|
|||
.. function:: domain_idle(domain, spider)
|
||||
|
||||
Sent when a domain has gone idle, which means the spider has no further:
|
||||
|
||||
* requests waiting to be downloaded
|
||||
* requests scheduled
|
||||
* items being processed in the item pipeline
|
||||
|
||||
If the idle state persists after all handlers of this signal have finished,
|
||||
the engine starts closing the domain. After the domain has finished
|
||||
closing, the :signal:`domain_closed` signal is sent.
|
||||
|
||||
You can, for example, schedule some requests in your :signal:`domain_idle`
|
||||
handler to prevent the domain from being closed.
|
||||
|
||||
:param domain: is a string with the domain of the spider which has gone idle
|
||||
:type domain: str
|
||||
|
||||
:param spider: the spider which has gone idle
|
||||
:type spider: :class:`~scrapy.spider.BaseSpider` object
|
||||
|
||||
If any handler of this signal handlers raises a
|
||||
:exc:`DontCloseDomain` the domain won't be closed this time and will
|
||||
wait until another idle signal is sent. Otherwise (if no handler raises
|
||||
:exc:`DontCloseDomain`) the domain will be closed immediately after
|
||||
all handlers of ``domain_idle`` have finished, and a
|
||||
:signal:`domain_closed` will thus be sent.
|
||||
|
||||
engine_started
|
||||
--------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue