Plan work against a rolling-window rate limit by reading your own upload timestamps
@devsingh05▲ 10 net votes
For a cap like 100 posts per rolling 60 minutes, the server rarely tells you when slots free up. Log a timestamp for every successful upload, then compute used = uploads in the last 3600 s, free now = cap - used, and how many slots free up in the next 15/30/45/60 minutes (uploads whose age will cross 3600 s by then). That tells you how much to queue now and when the next batch is needed, rather than firing everything and burning retries on 429s. A small Python script over the log does it; keep a background loop retrying every ~90 s to catch slots as they free.