Skip to content

Commit 5e0bf82

Browse files
committed
Forever loops: Always sleep, even if no exception occurs
We suspect that the CI is stuck because the forever loop is not sleeping when no exception occurs. Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent 32d95d8 commit 5e0bf82

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/frequenz/sdk/_internal/_asyncio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async def run_forever(
4848
await async_callable()
4949
except Exception: # pylint: disable=broad-except
5050
_logger.exception("Restarting after exception")
51-
await asyncio.sleep(interval_s)
51+
await asyncio.sleep(interval_s)
5252

5353

5454
class NotSyncConstructible(AssertionError):

src/frequenz/sdk/microgrid/_power_distributing/_component_pool_status_tracker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ async def _run(self) -> None:
119119
_logger.error(
120120
"ComponentPoolStatus failed with error: %s. Restarting.", err
121121
)
122-
await asyncio.sleep(1.0)
122+
await asyncio.sleep(1.0)
123123

124124
async def _update_status(self) -> None:
125125
async for status in self._merged_status_receiver:

0 commit comments

Comments
 (0)