diagnostics: Split app initialization

Tests:

- When a print message is added in low disk space checking method, it is printed
every 3 minutes.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2021-11-14 11:54:56 -08:00 committed by James Valleroy
parent 2947e182cd
commit 249c713bb5
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -64,6 +64,9 @@ class DiagnosticsApp(app_module.App):
**manifest.backup)
self.add(backup_restore)
@staticmethod
def post_init():
"""Perform post initialization operations."""
# Check periodically for low RAM space
interval = 180 if cfg.develop else 3600
glib.schedule(interval, _warn_about_low_ram_space)