global-electrification-platform / data-service

Data service of Global Electrification Platform
MIT License
2 stars 4 forks source link

Data Service should handle retries #76

Open EricSoroos opened 5 years ago

EricSoroos commented 5 years ago

(related to https://github.com/global-electrification-platform/explorer/issues/211)

The data service makes potentially expensive queries, so the responses are cached. However, if a duplicate request comes in prior to the initial one making it to the cache, they will both be executed. Since this is potentially the expected case due to a gateway timeout, we should make sure it's handled gracefully: