Refactor encoding method and reduce sleep time

The decoding method in the manage_athenad file has been refactored for parameter retrieval. Instead of decoding after receiving the parameter, decoding is now integrated in the parameter retrieval process. Also, the waiting time in the sunnylinkd.py has been reduced from 60 seconds to 10 to enhance performance and reduce lag.
This commit is contained in:
DevTekVE
2024-06-19 21:24:01 +02:00
parent 5836995097
commit 7dc412fcf1
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ def main():
def manage_athenad(dongle_id_param, pid_param, process_name, target):
params = Params()
dongle_id = params.get(dongle_id_param).decode('utf-8')
dongle_id = params.get(dongle_id_param, encoding='utf-8')
build_metadata = get_build_metadata()
cloudlog.bind_global(dongle_id=dongle_id,
+1 -1
View File
@@ -193,7 +193,7 @@ def main(exit_event: threading.Event = None):
is_registered = params.get("SunnylinkDongleId", encoding='utf-8') not in (None, UNREGISTERED_SUNNYLINK_DONGLE_ID)
while params.get_bool("SunnylinkEnabled") and not is_registered:
cloudlog.info("Waiting for sunnylink registration to complete")
time.sleep(60)
time.sleep(10)
UploadQueueCache.initialize(upload_queue)