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.
This commit is contained in:
DevTekVE
2024-06-19 20:52:15 +02:00
parent c7464fc615
commit 62b0c9f8be
+2 -1
View File
@@ -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: