Skip to content

#581 Revert counter decrement when RateLimit request fails - #603

Open
VasilevNStas wants to merge 1 commit into
zerocracy:masterfrom
VasilevNStas:580-conclude-follow-missing-property
Open

#581 Revert counter decrement when RateLimit request fails#603
VasilevNStas wants to merge 1 commit into
zerocracy:masterfrom
VasilevNStas:580-conclude-follow-missing-property

Conversation

@VasilevNStas

Copy link
Copy Markdown
Contributor

Fixes #581

track_request decrements @remaining/@searchleft before the HTTP call. If @app.call raises (network error, timeout), sync never fires and the counters stay decremented — drift grows over time.

Added untrack_request that reverses the decrement, called from a rescue StandardError in call.

@VasilevNStas
VasilevNStas force-pushed the 580-conclude-follow-missing-property branch 2 times, most recently from 1b27373 to 420937d Compare July 11, 2026 07:05
@VasilevNStas
VasilevNStas force-pushed the 580-conclude-follow-missing-property branch from 420937d to 14eaafe Compare July 11, 2026 07:06
@VasilevNStas

Copy link
Copy Markdown
Contributor Author

@yegor256 please review this PR

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 this pull request may close these issues.

RateLimit track_request decrements counter before confirming request succeeds

1 participant