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

write long running queries to file? #142

Open
schochastics opened this issue Nov 10, 2023 · 2 comments
Open

write long running queries to file? #142

schochastics opened this issue Nov 10, 2023 · 2 comments

Comments

@schochastics
Copy link
Member

all data is lost in the case of this error

df<-rtoot::get_timeline_hashtag("rstats",limit = 100000)
#>Rate limit exceeded, waiting for 514 seconds
#>Rate limit exceeded, waiting for 155 seconds
#>Error: something went wrong. Status code: 429
@chainsawriot
Copy link
Collaborator

The academictwitteR way of doing thing is to cache all api_response (as json files in their case)

rtoot/R/utils.R

Lines 124 to 126 in 519937a

api_response <- make_get_request(token = token,path = path,
instance = instance, params = params,
anonymous = anonymous)

If we are not going to provide resume function, maybe we can just cache output after L128.

@schochastics
Copy link
Member Author

schochastics commented Nov 10, 2023

Seems like a good idea. I think we dont need a resume function. One can resume with the max_id or whatever is returned in the header. But I need to verify this

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

No branches or pull requests

2 participants