mirror of
https://github.com/cjudice-commits/prediction-market-arb.git
synced 2026-07-27 13:37:46 +00:00
Run scanner as a launchd service; ARB_NO_POLLER guard
The local server kept dying because it ran as a background/agent process under ~/Desktop (a macOS TCC-protected folder): once the launching session ended the orphaned process lost Desktop access and every file read hit PermissionError. Permanent fix lives outside git -- the project now sits at ~/prediction-market-arb (not TCC-protected) and runs via a login LaunchAgent (RunAtLoad + KeepAlive: starts at login, restarts on crash, survives reboot). Code side: server.py honors ARB_NO_POLLER=1 to skip the local SMS poller (the LaunchAgent sets it) so the always-on server doesn't double-text alongside the GitHub Actions alerter; gitignore the service's *.log. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,9 @@ __pycache__/
|
||||
# pairs.json backup written by scripts/roll_month.py on every roll
|
||||
*.bak
|
||||
|
||||
# server log (LaunchAgent / manual run)
|
||||
*.log
|
||||
|
||||
# Local Claude Code config (launch.json, settings.local.json, worktrees, etc.)
|
||||
.claude/
|
||||
|
||||
|
||||
@@ -125,7 +125,10 @@ def main():
|
||||
print("Arb scanner running -> http://127.0.0.1:%d" % port)
|
||||
print("Press Ctrl+C to stop.")
|
||||
from arb import alerts
|
||||
alerts.start_poller()
|
||||
if os.environ.get("ARB_NO_POLLER") == "1":
|
||||
print("ARB_NO_POLLER=1 -> local SMS poller off (GitHub Actions alerts).")
|
||||
else:
|
||||
alerts.start_poller()
|
||||
try:
|
||||
srv.serve_forever()
|
||||
except KeyboardInterrupt:
|
||||
|
||||
Reference in New Issue
Block a user