From 38c2d51366fc0a4b18410a4306cd384f5fb95da2 Mon Sep 17 00:00:00 2001 From: jaxperro Date: Sun, 19 Jul 2026 12:18:22 -0400 Subject: [PATCH] =?UTF-8?q?ingest:=20resolve=20flyctl=20absolutely=20?= =?UTF-8?q?=E2=80=94=20launchd's=20minimal=20PATH=20broke=20the=20first=20?= =?UTF-8?q?nightly=20run?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- recorder/ingest.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/recorder/ingest.py b/recorder/ingest.py index d8680a5c..eb9caa43 100644 --- a/recorder/ingest.py +++ b/recorder/ingest.py @@ -8,6 +8,7 @@ import base64 import gzip import json import os +import shutil import subprocess import time @@ -16,8 +17,13 @@ DB = os.path.join(HERE, "..", "live", "rtds.duckdb") APP, SEG = "wwf-recorder", "/data/segments" +# launchd runs daily.sh with a minimal PATH (no /opt/homebrew/bin) — the +# 2026-07-18 run died on FileNotFoundError: 'flyctl'. Resolve it explicitly. +FLYCTL = shutil.which("flyctl") or "/opt/homebrew/bin/flyctl" + + def box(cmd): - r = subprocess.run(["flyctl", "ssh", "console", "-a", APP, "-C", + r = subprocess.run([FLYCTL, "ssh", "console", "-a", APP, "-C", f"bash -c '{cmd}'"], capture_output=True, text=True, timeout=300) return r.stdout