mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
app: Don't load apps again
- Only effective once. Second call will skip loading apps. - Helps with privileged daemon where actions might load apps repeatedly. Tests: - Diagnostics/enable/disable for apps bepasty, updates, config, security, nextcloud, homeassistant run fine. - Install/uninstall for bepasty works fine. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
This commit is contained in:
parent
e100c89ecc
commit
f2edc6ab2b
@ -596,6 +596,9 @@ class EnableState(LeaderComponent):
|
|||||||
|
|
||||||
def apps_init():
|
def apps_init():
|
||||||
"""Create apps by constructing them with components."""
|
"""Create apps by constructing them with components."""
|
||||||
|
if App.list():
|
||||||
|
return # Apps have already been initialized
|
||||||
|
|
||||||
from . import module_loader # noqa # Avoid circular import
|
from . import module_loader # noqa # Avoid circular import
|
||||||
for module_name, module in module_loader.loaded_modules.items():
|
for module_name, module in module_loader.loaded_modules.items():
|
||||||
_initialize_module(module_name, module)
|
_initialize_module(module_name, module)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user