Closed fcs-ts closed 1 year ago
Oof, I think the documentation for async functions may not be good enough yet: until_ready
calls check
on your behalf, waiting (and calling check
) until it has succeeded and the rate limit lets your call through.
You don't need to call check
a second time.
Oooh, that makes total sense. Thanks for the prompt response :)
I am trying to consume a very simple API, but I am hitting some unexpected behavior when using
until_ready
to wait for the rate limiter to be available again.My code looks like this
But I am hitting the rate limiter error (i.e.
check()
not being ready) every time I reach the limit, which I understand I should be hitting because of the previousuntil_ready()
call. I am missing something?Thanks in advance!