fix: Correctly track the number of requests handled by a crawler#3410
fix: Correctly track the number of requests handled by a crawler#3410
Conversation
barjin
left a comment
There was a problem hiding this comment.
lgtm, thanks!
I'd be more cautious about the breaking change, but I'll leave it up to you.
| protected handledRequestsCount = 0; | ||
|
|
||
| protected get handledRequestsCount(): number { | ||
| return this.stats.state.requestsFinished + this.stats.state.requestsFailed; |
There was a problem hiding this comment.
Side note: the failed requests are technically also "finished" (word-wise, not in Crawlee), I lobby for renaming this to requestsSucceeded in v4.
|
My point stands, do we really care for v3? I would postpone for v4, breaking change is a breaking change, there are many other users outside of Apify, so just checking their projects doesn't feel like strong evidence to me. Or does this block anyone? I thought it was just a random finding of ours, and in such case, I would target v4 to stay on the safe side. edit: hmm I do see the setter there, so I guess the PR description is not up to date? |
Just a poor choice of words, sorry. The setter is there, but it throws an error.
Its related to the same logic as #3153, which should probably be fixed sooner than
Fixing a bug is a breaking change, renaming
Fair enough, but it is a signal, albeit a weak one. If you think strongly about this, I'm not opposed to rebasing the PR onto |
BasicCrawler.handledRequestsCount#3083RequestManagerinstance breaksmaxRequestsPerCrawllimits #3330handledRequestsCountis breaking, but 1) this is an undocumented internal property and 2) there is only one ancient usage of it in apify-projects