sul-dlss / sdr-client

SDR API client (in Ruby)
https://sul-dlss.github.io/sdr-api/
Other
0 stars 1 forks source link

UploadFiles should interleave the upload request with the upload #167

Closed jcoyne closed 2 years ago

jcoyne commented 3 years ago

Currently we make all the upload requests before uploading any file. https://github.com/sul-dlss/sdr-client/blob/8b10568b690b02093e13ee825792314664fd94e7/lib/sdr_client/deposit/upload_files.rb#L38

if the uploads themselves take a long time and there are many of them, the tickets we created may have expired before the upload can begin.

We saw this in https://github.com/sul-dlss/happy-heron/issues/2056

We've worked around this by increasing the timeout in SDR-API, (https://github.com/sul-dlss/sdr-api/commit/3c32de7fe75dc22260771bdc9738615c56ce94c4) but a better solution would be to interleave the upload request and the upload.