Commit Graph

2 Commits

Author SHA1 Message Date
gavindiaz ee2ab5dda4 Fix double-push race + add slug debug log
Two fs.watch callbacks can fire for the same row within the 300ms debounce
window. Both enter the setTimeout, both read prevSide=null before either
sets it, both call send(). Result: duplicate push within ~20ms.

Fix: track lastSentTs. Same row timestamp = skip. Only a NEW row from
the bot (or a new manual append) can trigger another push.

Also log the slug before each push so we can diagnose the missing link.
2026-07-21 18:25:02 +08:00
gavindiaz 9b0da0279f Add Telegram watcher, dashboard docs, and deployment config
- scripts/telegram-watcher.js: push ENTER signals from signals.csv to Telegram
- DASHBOARD_GUIDE.md: complete dashboard field-by-field documentation
- package.json: add watch:telegram npm script
- .env.example: deployment env template
- .gitignore: exclude ecosystem.config.cjs/start.sh (server-only with paths)

Watcher reads recommendation column and triggers on:
  - transition NO_TRADE -> ENTER:side
  - flip ENTER:UP <-> ENTER:DOWN
  - 30s cooldown prevents spam
2026-07-21 18:00:21 +08:00