From 855714019361889b0291ab36b4008f02c7779095 Mon Sep 17 00:00:00 2001 From: Aaron Date: Sun, 14 Dec 2025 19:01:46 -0500 Subject: [PATCH] Avoid restarting API during installs --- pikit_api/releases.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pikit_api/releases.py b/pikit_api/releases.py index 5bd9c6c..4d044d5 100644 --- a/pikit_api/releases.py +++ b/pikit_api/releases.py @@ -536,8 +536,9 @@ def _install_manifest(manifest: Dict[str, Any], meta: Optional[Dict[str, Any]], shutil.rmtree(API_PACKAGE_DIR, ignore_errors=True) shutil.copytree(staged_pkg, API_PACKAGE_DIR, dirs_exist_ok=True) - for svc in ("pikit-api.service", "dietpi-dashboard-frontend.service"): - subprocess.run(["systemctl", "restart", svc], check=False) + # Restart frontend to pick up new assets; avoid restarting this API process + # mid-apply to prevent leaving state in_progress. + subprocess.run(["systemctl", "restart", "dietpi-dashboard-frontend.service"], check=False) VERSION_FILE.parent.mkdir(parents=True, exist_ok=True) VERSION_FILE.write_text(str(latest))