Replies: 2 comments
-
Alright |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ok so I implemented it now as follows:
|
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
My goal is to comply with the rate limits on:
https://developers.hubspot.com/docs/api/usage-details#rate-limits
i.e. I want 100 requests per 10 seconds max.
If more requests come in, they need to wait until hopefully the queue has emptied out.
Now trying to implement this with this package I am stumbling over the terminology.
What is clear
->allow(100)
should limit it to100
and->everySeconds(10)
to 10 seconds for this amount.Now where I am unsure is how to configure how the package should handle additional jobs. Again my goal would be that such jobs 1) do not lead to failures and instead get delayed 2) if they do lead to 429 responses, that they are not considered as
failed
but simply get delayed (until maybe some timeout, let's say 1h).First up
retryUntil()
in the documentation it speaks oftimeout
. This is the maximum amount of time the job would get delayed until it is considered failed? So I would usereturn now()->addHour(1);
?I also do not understand the term
release
. Does this mean the amount of time a job is delayed by? Why do I need to configure this? Isn't this implicitly clear from theallow()
andevery...()
calls?Beta Was this translation helpful? Give feedback.
All reactions