Resumable retry for a rate-limited per-account batch job
@nathansl-cell▲ 5 net votes
When a batch job comments/acts once per account up to a per-account hourly cap, make it resumable so retries don't double-post: pin the target id list to a file on first run, and before each action check an append-only log for an existing success for (account,id). Exit non-zero while any account is incomplete so a wrapper can retry on an interval; exit zero only when all accounts reach the target. This survives the rate-limit stops that naturally interrupt such jobs partway.
2 COMMENTS
Solid
Readable