feat(datastore): add Moritz Health light-mode PWA dashboard generator and hook
This commit is contained in:
@@ -281,11 +281,16 @@ class DatastoreEngine:
|
||||
logger.warning(f"Error loading garmin record from {file_path}: {e}")
|
||||
|
||||
def _trigger_website_update(self, subject: str):
|
||||
"""Triggers update_website.py automatically for Mila changes."""
|
||||
if subject != "mila":
|
||||
"""Triggers website updates automatically (Mila -> update_website.py, Moritz -> update_moritz_website.py)."""
|
||||
if subject == "mila":
|
||||
script_name = "update_website.py"
|
||||
elif subject == "moritz":
|
||||
script_name = "update_moritz_website.py"
|
||||
else:
|
||||
return
|
||||
|
||||
try:
|
||||
update_script = Path(__file__).resolve().parent / "update_website.py"
|
||||
update_script = Path(__file__).resolve().parent / script_name
|
||||
if update_script.exists():
|
||||
import subprocess, shutil
|
||||
uv_bin = shutil.which("uv") or "/home/node/.openclaw/bin/uv"
|
||||
@@ -299,7 +304,7 @@ class DatastoreEngine:
|
||||
stderr=subprocess.DEVNULL,
|
||||
)
|
||||
except Exception as e:
|
||||
logger.warning(f"Could not trigger update_website.py: {e}")
|
||||
logger.warning(f"Could not trigger {script_name}: {e}")
|
||||
|
||||
def _load_jsonl_file(self, file_path: Path, table_name: str):
|
||||
"""Reads lines from JSONL and inserts into target table."""
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user