Replies: 2 comments 2 replies
-
You are aware that Bull supports Rate limit right? https://github.com/OptimalBits/bull/blob/develop/REFERENCE.md#queue |
Beta Was this translation helpful? Give feedback.
1 reply
-
I am having trouble trying to comprehend your question, could you rephrase it please? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I have a somewhat specific question and I'm sorry I created an issue for this, but I couldn't found any chat or forum to be able to do so.
I want to use Bull to rate limit creation of usage records on Stripe (100/s). I'm receiving these usage records and sending the sum of them within the API limits.
For this I'm using Redis INCRBY and creating a job, I'm using job ID so that the job is only created once and removed after being processed:
When processing the queue I'm using GETDEL to retrieve the usage data and send it to Stripe
What I'm wondering is, if its possible to use INCRBY and GETDEL for job data instead of relying on additional keys to be stored elsewhere?
I'm encountering cases when a usage arrives while the job is being processed, which causes the newly arrived usage to be processed the next time a new usage request arrives. The reason being a new job will not be created (because of the same id) while the old one is still being processed.
Being able to increase usage quantity in job data would potentially solve this issue, I'm also open to other suggestions.
Beta Was this translation helpful? Give feedback.
All reactions