Files
TSSBOT/start_bot.py
T
NotSoToothless a7de9ecad2 Auto merge dev → main (#1226)
* add tssbot PM2 entry + extend webhook updater to handle TSSBOT

- TSSBOT/ecosystem.config.js: defines just the tssbot app for now.
  Uses system python3 (skeleton has no deps); switch to .venv/bin/python
  once TSSBOT/BOT/botscript.py and a real dependency set exist.
- TSSBOT/start_bot.py: change the stub from exit-immediately to an
  idle loop with SIGTERM/SIGINT handling so PM2 doesn't restart-loop
  the placeholder.
- SREBOT/github_webhook_updater.py: same listener handles the whole
  monorepo. Add a tssbot restart rule that triggers on TSSBOT/BOT/,
  TSSBOT root .py, TSSBOT/start_bot.py, TSSBOT/ecosystem.config.js,
  or SHARED/ changes. A push to SHARED restarts both bots; pushes
  scoped to one bot only restart that bot.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* update game files and start tssbot

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 23:49:54 -07:00

25 lines
706 B
Python

#!/usr/bin/env python3
"""Entry point for TSSBOT. Skeleton — idles until BOT/botscript.py is wired."""
import signal
import sys
import time
from pathlib import Path
# Make TSSBOT root and BOTS/SHARED importable.
_HERE = Path(__file__).resolve().parent
sys.path.insert(0, str(_HERE))
sys.path.insert(0, str(_HERE.parent / "SHARED"))
def _handle_signal(signum, _frame):
print(f"[tssbot] received signal {signum}, exiting")
sys.exit(0)
if __name__ == "__main__":
signal.signal(signal.SIGTERM, _handle_signal)
signal.signal(signal.SIGINT, _handle_signal)
print("[tssbot] skeleton booted — replace with real bot once BOT/botscript.py exists")
while True:
time.sleep(60)