Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEPTH_STATS has no effect #3245

Closed
rpkilby opened this issue May 3, 2018 · 0 comments
Closed

DEPTH_STATS has no effect #3245

rpkilby opened this issue May 3, 2018 · 0 comments

Comments

@rpkilby
Copy link
Contributor

@rpkilby rpkilby commented May 3, 2018

It looks like this flag stopped functioning in #99. crawler.stats are always passed to the middleware, and are always collected.

Additionally, it looks like this middleware would error if stats weren't provided, as the initial depth value would otherwise never be set.

if self.stats and 'depth' not in response.meta:
response.meta['depth'] = 0
if self.verbose_stats:
self.stats.inc_value('request_depth_count/0', spider=spider)

@dangra dangra closed this in #3253 Jul 11, 2018
dangra added a commit that referenced this issue Jul 11, 2018
[MRG+1] Update depth middleware stats (fixes #3245)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

1 participant