cleanup cli, configs, systemd and readme

This commit is contained in:
2026-04-02 01:18:15 +03:00
parent 7a86519314
commit 50961eb3fc
17 changed files with 741 additions and 294 deletions

View File

@@ -479,9 +479,20 @@ async def serve_daemon(args) -> int:
raise RuntimeError("No stations found")
conns: Dict[str, StationConn] = {}
for st in selected:
conns[st.device_id] = StationConn(st, oauth, args.wait)
await conns[st.device_id].start()
try:
for st in selected:
conns[st.device_id] = StationConn(st, oauth, args.wait)
await conns[st.device_id].start()
except Exception as exc:
for c in conns.values():
try:
await c.close()
except Exception:
pass
msg = str(exc)
if "AUTH_TOKEN_INVALID" in msg:
raise RuntimeError("YANDEX_OAUTH_TOKEN invalid: update token and retry") from exc
raise
async def resolve_conn(station_sel: str) -> Optional[StationConn]:
station_sel = (station_sel or "").strip()