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 · Fixed by #3253
Closed

DEPTH_STATS has no effect #3245

rpkilby opened this issue May 3, 2018 · 0 comments · Fixed by #3253

Comments

@rpkilby
Copy link
Contributor

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 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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant