storage: Split app initialization

Tests:

- Upon startup, 'storage usage-info' action is triggered 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 12:05:15 -08:00 committed by James Valleroy
parent e5b56e44f1
commit 4b3a4020d9
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -68,6 +68,9 @@ class StorageApp(app_module.App):
**manifest.backup)
self.add(backup_restore)
@staticmethod
def post_init():
"""Perform post initialization operations."""
# Check every hour for low disk space, every 3 minutes in debug mode
interval = 180 if cfg.develop else 3600
glib.schedule(interval, warn_about_low_disk_space)