GTC-2823 Fix retries when getting latest version of a dataset
I noticed that the retry code in RasterCatalog.getLatestVersion was not correct. It was using recursion to do one or more retries, but wasn't actually using any successful response from a retry, but instead still used the original unsuccessful response. Broke out a separate function getLatestVersionResponse() to fix the problem. I am still doing 2 more retries after the first request.
Also, increased the connection timeout from 10 seconds to 20 seconds.
These fixes should make Geotrellis more resilient to slow responses from the Data API. With a bigger change, I could also get rid of the "latest version" requests for FCD and AFI analyses, since they don't actually use the integrated alerts dataset.
GTC-2823 Fix retries when getting latest version of a dataset
I noticed that the retry code in RasterCatalog.getLatestVersion was not correct. It was using recursion to do one or more retries, but wasn't actually using any successful response from a retry, but instead still used the original unsuccessful response. Broke out a separate function getLatestVersionResponse() to fix the problem. I am still doing 2 more retries after the first request.
Also, increased the connection timeout from 10 seconds to 20 seconds.
These fixes should make Geotrellis more resilient to slow responses from the Data API. With a bigger change, I could also get rid of the "latest version" requests for FCD and AFI analyses, since they don't actually use the integrated alerts dataset.