ropensci / crul

R6 based http client for R (for developers)
https://docs.ropensci.org/crul
Other
107 stars 17 forks source link

Integrate progress bars for Async requests #168

Open sxthimons opened 2 years ago

sxthimons commented 2 years ago

Currently, it looks like Async does not allow for the progress to be displayed when making requests. This would be helpful to determine if a request is still in progress or failing.

sckott commented 2 years ago

You can pass httr::progress() to the progress param in https://docs.ropensci.org/crul/reference/HttpRequest.html which are used in https://docs.ropensci.org/crul/reference/AsyncVaried.html

But I doubt that's what you are looking for. I assume you are looking for progress across all the requests rather than within each request?

sxthimons commented 2 years ago

I'd prefer across each request. When using the Async$new(urls = urls, progress = httr::progress()) it doesn't look like it's accepting it trying to create the initial R6 class variable: Error in initialize(...) : unused argument (progress = list(NULL, NULL, NULL, NULL, list(FALSE, function (down, up)...

I've also tried to pass it through the opts argument on the Async as well.

sckott commented 2 years ago

I don't think this will happen unless you want to add it yourself via a pull request