Repository navigation
Stop rebilling completed Instagram recheck batches - #91
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When more than 50 event source posts were due for the three-day deletion check, the Apify detail helper reused a completed batch's saved post list for subsequent purchases. Later cycles could keep buying lookups for expired posts while recording zero useful checks.
Completed detail runs now accept the next batch's post list; unfinished runs retain their original list and paid run ID. Rechecks persist each batch before consuming its run, track run IDs so recovery cannot count a deletion twice, and publish withdrawals before recording them as finished. Empty or unrelated output stops further batches and keeps the paid run for investigation.
The three-day eligibility window, one successful check per source post, and two separate deletion confirmations remain unchanged. Existing completed recovery files need no reset.
Validation: all 845 pipeline tests pass; git diff --check passes. Eleven new integration tests cover multiple batches and later cycles, legacy state, interrupted reads/writes, changed worklists, expired events, charge/run failures, unrelated output, rate limits, and withdrawal failures. Apify and database operations in the tests are simulated; no paid production run was started.