-
Notifications
You must be signed in to change notification settings - Fork 28
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
batch requests: Send a new request as soon as one is downloaded #105
Comments
Might be related, when using batch requests I get this error at times: No encoding supplied: defaulting to UTF-8.
Error in if (private$status == "completed") { :
argument is of length zero This might suggest some offset timing in checking the status (with the element not being there anymore). Just writing this down for reference. I've had a hard time debugging this. Anyway, will get to this if I've more time. |
Personal notes, but read along if helpful. Trying to resolve this as it is slowing my work down. Some context, I'm running a large job of small subsets (site based) searches for hourly cloud cover data. Generally jobs are small (~100kb max) but traverse the time axis for a long time (decade). Batch processing stalls on the above error after variable times. This breaks the routine / downloads. I have a hunch that I'm getting kicked off the server or the timings are off, generating an edge case which is not captured in the current setup. To prevent frequent polling of the API using the batch routine I've put in a Tracking here: https://github.com/bluegreen-labs/ecmwfr/tree/patch-batch-request-issue |
So, well that didn't work. So it ain't an issue with spamming the API. I'm wondering if we miss one of the html codes in processing. Basically the error states that So, if here: Line 50 in c3e0e8f
Nothing gets assigned for some reason, things fall apart. |
Root cause is this statement which is split from the rest of the if - -if else logic. Line 94 in c3e0e8f
When when |
Long requests at time stall on:
Not the argument of length zero error anymore though. |
The above seems to be related to new support in curl (httr) for http2, which is automatically enabled. Can be set manually with: |
Thanks for the amazing package! |
This should be fixed in the latest dev release, not on CRAN yet as it is an edge case. |
The way the queue system is implemented now, once one requests is finished and downloaded, the code then checks the next request instead of immediately sending a new request. In practice requests will probably finish processing at roughly the same time, so the function will download one after the other until it stops and then send the new requests. It would be more time efficient to send a new request each time one is downloaded so it can start being processed while the code downloads the next.
I hope this is clear enough. 🤣
The text was updated successfully, but these errors were encountered: