From fef35f9d2ff43a2a818fb3afc8058ce59b56a65e Mon Sep 17 00:00:00 2001 From: Thomas Leplus Date: Wed, 25 Jun 2025 10:51:18 +0200 Subject: [PATCH] Add new configuration options for delays --- config/shared_config.json | 2 ++ display.py | 4 ++-- shared.py | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/shared_config.json b/config/shared_config.json index 9278659..ff596ef 100644 --- a/config/shared_config.json +++ b/config/shared_config.json @@ -17,6 +17,7 @@ "startup_delay": 10, "web_delay": 2, "screen_delay": 1, + "vuln_count_display_delay": 300, "comment_delaymin": 15, "comment_delaymax": 30, "livestatus_delay": 8, @@ -24,6 +25,7 @@ "image_display_delaymax": 8, "scan_interval": 180, "scan_vuln_interval": 900, + "shared_data_update_delay": 25, "failed_retry_delay": 600, "success_retry_delay": 900, "ref_width": 122, diff --git a/display.py b/display.py index 2f78a85..05845f2 100644 --- a/display.py +++ b/display.py @@ -88,13 +88,13 @@ def schedule_update_shared_data(self): """Periodically update the shared data with the latest system information.""" while not self.shared_data.display_should_exit: self.update_shared_data() - time.sleep(25) + time.sleep(self.shared_data.shared_data_update_delay) def schedule_update_vuln_count(self): """Periodically update the vulnerability count on the display.""" while not self.shared_data.display_should_exit: self.update_vuln_count() - time.sleep(300) + time.sleep(self.shared_data.vuln_count_display_delay) def update_main_image(self): """Update the main image on the display with the latest immagegen data.""" diff --git a/shared.py b/shared.py index 3ebe912..b956c96 100644 --- a/shared.py +++ b/shared.py @@ -131,6 +131,7 @@ def get_default_config(self): "startup_delay": 10, "web_delay": 2, "screen_delay": 1, + "vuln_count_display_delay": 300, "comment_delaymin": 15, "comment_delaymax": 30, "livestatus_delay": 8, @@ -138,6 +139,7 @@ def get_default_config(self): "image_display_delaymax": 8, "scan_interval": 180, "scan_vuln_interval": 900, + "shared_data_update_delay": 25, "failed_retry_delay": 600, "success_retry_delay": 900, "ref_width" :122 ,