fix: Reset all counter in metadata with `purge` for `RequestQueue` by Mantisus · Pull Request #1686 · apify/crawlee-python

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@Mantisus

Copy link

Collaborator

Description

  • Reset all counter in metadata with purge for RequestQueue. This will be more consistent with JS. Also, saving the total_request_count and handled_request_count counters causes confusion among users, especially when this happens with the default queue.

Issues

@Mantisus Mantisus requested review from Pijukatel and vdusek

January 24, 2026 20:36

@Mantisus Mantisus self-assigned this

Jan 24, 2026

@Mantisus

Copy link

Collaborator Author

@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?

@vdusek

Copy link

Collaborator

vdusek commented

Jan 26, 2026

Yeah, 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.

Mantisus reacted with thumbs up emoji
Copy link

Collaborator

@vdusek 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

@vdusek vdusek merged commit ee09260 into apify:master

Jan 26, 2026

30 checks passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vdusek vdusek vdusek approved these changes

@Pijukatel Pijukatel Pijukatel approved these changes

Assignees

@Mantisus Mantisus

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Logs: incorrect number of pages to crawl

4 participants

@Mantisus @vdusek @Pijukatel @apify-service-account