fix: Reset all counter in metadata with `purge` for `RequestQueue` by Mantisus · Pull Request #1686 · apify/crawlee-python
Navigation Menu
{{ message }}
apify / crawlee-python Public
- Notifications You must be signed in to change notification settings
- Fork 705
Merged
fix: Reset all counter in metadata with purge for RequestQueue#1686
vdusek merged 1 commit intoapify:masterfrom
fix: Reset all counter in metadata with purge for RequestQueue#1686
vdusek merged 1 commit intoapify:masterfrom
Conversation
Copy link
Collaborator
Mantisus
commented
Jan 24, 2026
Mantisus
commented
Description
- Reset all counter in metadata with
purgeforRequestQueue. This will be more consistent with JS. Also, saving thetotal_request_countandhandled_request_countcounters causes confusion among users, especially when this happens with thedefaultqueue.
Issues
Mantisus
requested review from
Pijukatel and
vdusek
Mantisus
self-assigned this
Copy link
Collaborator Author
Mantisus
commented
Jan 24, 2026
Mantisus commented
Jan 24, 2026@vdusek The current behavior of purge was implemented during the storage refactoring. Perhaps there was a reason for keeping the handled_request_count' and total_request_count' counters?
Pijukatel approved these changes Jan 26, 2026
Copy link
Collaborator
vdusek
commented
Jan 26, 2026
vdusek commented
Jan 26, 2026Yeah, I initially thought total_request_count should represent the actual total number of requests this instance has processed (even if purge was executed), with only a drop resetting it. But if that's confusing or inconsistent with the JS version, then let's change it.
vdusek approved these changes Jan 26, 2026
Copy link
Collaborator
vdusek
left a comment
vdusek
left a comment
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment