solarforecastarbiter.io.fetch.nwp.get_with_retries¶
-
solarforecastarbiter.io.fetch.nwp.
get_with_retries
(get_func, *args, retries=5, **kwargs)[source]¶ Call get_func and retry if the request fails
Parameters: - get_func (function) – Function that performs an aiohttp call to be retried
- retries (int) – Number of retries before raising the error
- *args – Passed to get_func
- **kwargs – Passed to get_func
Returns: Result of get_func
Raises: aiohttp.ClientResponseError
– When get_func fails after retrying retries times