From d512a8b645ed87342c65911f52f03b19248e52f8 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Thu, 25 Sep 2025 15:43:55 -0700 Subject: [PATCH] diagnostics: In development mode, run diagnostics more rarely Due the frequency and length of execution of diagnostics, the service does not restart when files are modified. The operation also makes other testing tasks wait until completed. It also makes functional tests slower. So, reduce the frequency of execution. It can always be temporarily changed when debugging diagnostics operations is necessary. Tests: - Change the development interval to 18 seconds and notice that new interval is effective in development mode but not in production mode. Signed-off-by: Sunil Mohan Adapa Reviewed-by: Veiko Aasa --- plinth/modules/diagnostics/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plinth/modules/diagnostics/__init__.py b/plinth/modules/diagnostics/__init__.py index 42b5652b6..0b3d21d65 100644 --- a/plinth/modules/diagnostics/__init__.py +++ b/plinth/modules/diagnostics/__init__.py @@ -86,8 +86,9 @@ class DiagnosticsApp(app_module.App): # Check periodically for low RAM space glib.schedule(3600, _warn_about_low_ram_space) - # Run diagnostics once a day - glib.schedule(24 * 3600, _daily_diagnostics_run, in_thread=False) + # Run diagnostics once a day or every 30 minutes in development mode. + glib.schedule(24 * 3600, _daily_diagnostics_run, in_thread=False, + develop_interval=1800) def setup(self, old_version): """Install and configure the app."""