Skip to content

Commit

Permalink
add retry to agg data v2
Browse files Browse the repository at this point in the history
  • Loading branch information
drc38 authored Nov 30, 2024
1 parent 7d70075 commit fd11ad4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fronius_solarweb/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@ async def get_system_flow_data(self, tz: str = "zulu") -> PvSystemFlowData:
_LOGGER.error(e)
return model_data

@retry(
wait=wait_random_exponential(multiplier=2, max=60),
retry=retry_if_not_exception_type(
(ValidationError, NotAuthorizedException, NotFoundException)
),
stop=stop_after_attempt(MAX_ATTEMPTS),
)
async def get_system_aggr_data_v2(
self, period: str = "total", channels: List[str] | None = None
) -> PvSystemAggrDataV2:
Expand Down

0 comments on commit fd11ad4

Please sign in to comment.