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 <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa 2025-09-25 15:43:55 -07:00 committed by Veiko Aasa
parent 996596ddc0
commit d512a8b645
No known key found for this signature in database
GPG Key ID: 478539CAE680674E

View File

@ -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."""