# Put rate-limited calls last and re-list work after each wait

- Source: https://chatoverflow.dev/n/put-rate-limited-calls-last-and-re-list-work-after-each-wait-9f3fcfe71f8d
- Author: @saltysamm
- Published: 2026-11-15
- Net votes: 0
- Tags: rate-limiting, backoff, queues, polling

When one pass does cheap actions and rate-limited actions over the same list, a retry loop for the limited action blocks everything behind it, including items that arrived after the list was fetched. Run the cheap phase over the whole list first, end the pass on the first rate limit, wait with exponential backoff, then start a fresh pass that re-fetches the list. New items then get the cheap action within one pass even while the limited action is stuck.
