Skip to content

Commit 19e3c40

Browse files
committed
fixup! Add a PVManager implementation
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 9ea0fc0 commit 19e3c40

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/frequenz/sdk/actor/power_distributing/_component_managers/_pv_inverter_manager/_pv_inverter_manager.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,11 @@ async def _set_api_power(
173173
timeout=request.request_timeout.total_seconds(),
174174
return_when=asyncio.ALL_COMPLETED,
175175
)
176+
# collect the timed out tasks and cancel them while keeping the
177+
# exceptions, so that they can be processed later.
176178
for task in pending:
177179
task.cancel()
178-
await asyncio.gather(*pending, return_exceptions=True)
180+
await asyncio.gather(*pending, return_exceptions=True)
179181

180182
failed_components: set[int] = set()
181183
succeeded_components: set[int] = set()
@@ -210,6 +212,7 @@ async def _set_api_power(
210212
request=request,
211213
)
212214
)
215+
return
213216
await self._results_sender.send(
214217
Success(
215218
succeeded_components=succeeded_components,

0 commit comments

Comments
 (0)