-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instagram Post Queue for sseramemes #1455
Comments
On Meta page, we have this message:
How will you guarantee that the previous day's queue won't consume the quota of the current day? For instance, if you post 100 times, 50 succeed, and 50 go to the queue, how will you guarantee that those 50 won't consume the quota the next day? |
what about a rate limit? how many memes per minutes? if the meme fail, try retry in X minutes |
Reading the details of the Graph API on Meta page, we can found details about using the API. By the way, it seems the rate limited is computed by hour, as it says here:
One solution is, if the limit is reached and the api call returns an error, we can store new memes on queue and flush them 1 hour later (maybe?). I want to highlight another snippet:
Did the API calls are returning the X-App-Usage header on response? |
Feature Request
The idea is a Post Queue to schedule the posts to be published by intermittent intervals. New memes should be enqueue on the end of this Queue and posted later, following the flux of the intervals.
Why it is needed
As @arantespp pointed out on Discord, Instagram bots have a limit of activity in a time span.
Possible implementation
Two possible impls for the queue:
The logic gonna follows as normal queue data structure.
The intervals can be set with setInterval by an amount of time that can be customized.
If the queue is empty, the dequeue can be ignored (maybe a try/catch block or a queue.isEmpty method) and setInterval gonna follow its flow.
Code Sample
Gonna build soon
The text was updated successfully, but these errors were encountered: