Add note for DEPTH_PRIORITY

This commit is contained in:
Paul Tremberth 2016-01-27 11:53:29 +01:00
parent 1c83108893
commit 6ed08d2332
1 changed files with 19 additions and 2 deletions

View File

@ -276,6 +276,8 @@ DEPTH_LIMIT
Default: ``0``
Scope: ``scrapy.spidermiddlewares.depth.DepthMiddleware``
The maximum depth that will be allowed to crawl for any site. If zero, no limit
will be imposed.
@ -286,9 +288,20 @@ DEPTH_PRIORITY
Default: ``0``
An integer that is used to adjust the request priority based on its depth.
Scope: ``scrapy.spidermiddlewares.depth.DepthMiddleware``
If zero, no priority adjustment is made from depth.
An integer that is used to adjust the request priority based on its depth:
- **a positive value will decrease the priority**
- a negative value will increase priority
If zero (default), no priority adjustment is made from depth.
.. note::
This setting adjusts priority **in the opposite way** compared to
other priority settings :setting:`REDIRECT_PRIORITY_ADJUST`
and :setting:`RETRY_PRIORITY_ADJUST`.
.. setting:: DEPTH_STATS
@ -297,6 +310,8 @@ DEPTH_STATS
Default: ``True``
Scope: ``scrapy.spidermiddlewares.depth.DepthMiddleware``
Whether to collect maximum depth stats.
.. setting:: DEPTH_STATS_VERBOSE
@ -306,6 +321,8 @@ DEPTH_STATS_VERBOSE
Default: ``False``
Scope: ``scrapy.spidermiddlewares.depth.DepthMiddleware``
Whether to collect verbose depth stats. If this is enabled, the number of
requests for each depth is collected in the stats.