Skip to content
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

Retry when rate limits are hit #8

Merged
merged 3 commits into from Nov 6, 2021
Merged

Conversation

krlmlr
Copy link
Contributor

@krlmlr krlmlr commented Oct 2, 2021

I tried with httr::RETRY(), a home-grown solution works better because RETRY() doesn't take into account the x-ratelimit-reset header.

library(clickrup)
#> clickrup 0.0.3    2021-04-09
for (i in 1:250) {
  message("#", appendLF = FALSE)
  cu_get_teams()
}
#> #
#> ####################################################################################################ClickUp API: Rate limit reached, sleeping for 54 seconds.
#> ####################################################################################################ClickUp API: Rate limit reached, sleeping for 53 seconds.
#> #################################################

message()
#> 

Created on 2021-10-02 by the reprex package (v2.0.1)

@psolymos psolymos merged commit f649456 into psolymos:master Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants