Skip to content

Commit 46caca0

Browse files
committed
ComponentTracker: Sleep after restarting the loop to give other tasks a chance
Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent 65b84ca commit 46caca0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/frequenz/sdk/microgrid/_power_distributing/_component_status/_battery_status_tracker.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ async def _run(
316316

317317
except Exception as err: # pylint: disable=broad-except
318318
_logger.exception("BatteryStatusTracker crashed with error: %s", err)
319+
await asyncio.sleep(0.1)
319320

320321
def _get_current_status(self) -> ComponentStatusEnum:
321322
"""Get current battery status.

0 commit comments

Comments
 (0)