manager: merge prepare and init
old-commit-hash: ce947ffe9a1f31190b89b83e2266bf2a78f2d798
This commit is contained in:
@@ -105,8 +105,7 @@ def manager_init() -> None:
|
||||
dirty=is_dirty(),
|
||||
device=HARDWARE.get_device_type())
|
||||
|
||||
|
||||
def manager_prepare() -> None:
|
||||
# preimport all processes
|
||||
for p in managed_processes.values():
|
||||
p.prepare()
|
||||
|
||||
@@ -186,17 +185,8 @@ def manager_thread() -> None:
|
||||
|
||||
|
||||
def main() -> None:
|
||||
prepare_only = os.getenv("PREPAREONLY") is not None
|
||||
|
||||
manager_init()
|
||||
|
||||
# Start UI early so prepare can happen in the background
|
||||
if not prepare_only:
|
||||
managed_processes['ui'].start()
|
||||
|
||||
manager_prepare()
|
||||
|
||||
if prepare_only:
|
||||
if os.getenv("PREPAREONLY") is not None:
|
||||
return
|
||||
|
||||
# SystemExit on sigterm
|
||||
|
||||
Reference in New Issue
Block a user