mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-10 18:23:44 +08:00
Agnos 19.6.10
This commit is contained in:
@@ -1094,11 +1094,6 @@ def manager_init() -> None:
|
||||
device=HARDWARE.get_device_type())
|
||||
last_timing = _log_boot_timing("manager_init", "logging_ready", manager_init_start, last_timing)
|
||||
|
||||
# preimport all processes
|
||||
for p in managed_processes.values():
|
||||
p.prepare()
|
||||
last_timing = _log_boot_timing("manager_init", "preimport_processes", manager_init_start, last_timing)
|
||||
|
||||
# StarPilot variables
|
||||
install_starpilot(build_metadata, params)
|
||||
last_timing = _log_boot_timing("manager_init", "install_starpilot", manager_init_start, last_timing)
|
||||
|
||||
@@ -634,19 +634,7 @@ class PythonProcess(ManagerProcess):
|
||||
self.launcher = launcher
|
||||
|
||||
def prepare(self) -> None:
|
||||
if self.enabled:
|
||||
cloudlog.info(f"preimporting {self.module}")
|
||||
start = time.monotonic()
|
||||
try:
|
||||
importlib.import_module(self.module)
|
||||
finally:
|
||||
line = f"SP_BOOT_TIMING preimport {self.name} module={self.module} +{time.monotonic() - start:.3f}s"
|
||||
try:
|
||||
with open(os.environ.get("SP_BOOT_TIMING_LOG", "/tmp/starpilot_boot_timing.log"), "a") as f:
|
||||
f.write(line + "\n")
|
||||
except OSError:
|
||||
pass
|
||||
cloudlog.warning(line)
|
||||
pass
|
||||
|
||||
def start(self) -> None:
|
||||
# In case we only tried a non blocking stop we need to stop it before restarting
|
||||
|
||||
Reference in New Issue
Block a user