From 62b0c9f8be2d1620b01101ca8d0def8b4de28382 Mon Sep 17 00:00:00 2001 From: DevTekVE Date: Wed, 19 Jun 2024 20:52:15 +0200 Subject: [PATCH] Add delay before retrying sunnylinkd main The update introduces a 60-second delay before retrying the execution of sunnylinkd main when SunnylinkEnabled is false. This aims to prevent the immediate termination of the process when SunnylinkEnabled is turned off, allowing for a smoother transition. --- system/athena/sunnylinkd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/athena/sunnylinkd.py b/system/athena/sunnylinkd.py index b61da2833c..4715994e48 100755 --- a/system/athena/sunnylinkd.py +++ b/system/athena/sunnylinkd.py @@ -205,7 +205,8 @@ def main(exit_event: threading.Event = None): while exit_event is None or not exit_event.is_set(): try: if not is_sunnylink_enabled: - cloudlog.warning("Exiting sunnylinkd.main as SunnylinkEnabled is False") + cloudlog.debug("Exiting sunnylinkd.main as SunnylinkEnabled is False but will retry in 60 seconds") + time.sleep(60) break if conn_start is None: