diff --git a/ais_bridge.py b/ais_bridge.py index c4fb781..e690a51 100644 --- a/ais_bridge.py +++ b/ais_bridge.py @@ -113,6 +113,7 @@ def writer(out_path): with os.fdopen(fd, "w") as f: f.write(body) os.replace(tmp, out_path) # atomic — readers never see a torn file + os.chmod(out_path, 0o644) # mkstemp births 0600 — nginx (other uid) must read it with open(os.path.join(jobs, "godsigh-ais.status"), "w") as f: f.write(json.dumps({"ts": int(now), "ships": len(rows), "msgs": stats["msgs"]})) print(f"[ais] {len(rows)} ships · {stats['msgs']} msgs", flush=True)