JiscSD / archivematica

Free and open-source digital preservation system designed to maintain standards-based, long-term access to collections of digital objects.
http://www.archivematica.org
GNU Affero General Public License v3.0
0 stars 0 forks source link

storageService: add new query timeout #58

Closed sevein closed 6 years ago

sevein commented 6 years ago

RDSSARK-425

Certain endpoints in SS are expected to return immediately (e.g. get_pipeline) but we have a single deadline that applies to all the requests and it's normally set very high (1 day) to deal with some long-running requests that SS can't delay (STORAGE_SERVICE_CLIENT_TIMEOUT=86400).

This pull request only attempts to create a new timeout for those endpoints that are supposed to be fast (e.g. `get_pipeline) so when the SS is unreachable we have a short deadline instead of the recently added deadline meant to be used for long-running operations (which should be delayed anyways but that's being solved separately, i.e. ask Justin about his plans for async ops in SS).

New environments:

I couldn't fin da better name. STORAGE_SERVICE_CLIENT_QUERY_TIMEOUT=5 kind of made sense because we already have STORAGE_SERVICE_CLIENT_TIMEOUT=86400 for slow requests. I'm open to suggestions.

sevein commented 6 years ago

Ok done.