brackt/app/services/standings-sync
Chris Parsons 85bfc657e5 Add Phase A: external HTTP cron jobs for snapshots, standings sync, and simulation
- Add POST /admin/jobs/run-daily-snapshots (replaces 24h setInterval in server/snapshots.ts)
- Add POST /admin/jobs/sync-and-simulate (syncs standings every 2h; only simulates when standings
  actually changed by comparing gamesPlayed + leagueRank before upserting)
- Add standingsLastChangedAt + lastSimulatedAt columns to sportsSeasons (migration 0118)
- Add GET /healthz route for Docker healthcheck (pings DB, returns 503 on failure)
- Add app/lib/cron-auth.ts shared X-Cron-Secret header auth helper
- Remove startSnapshotSystem() from server/socket.ts (no more in-process setInterval)
- Add Forgejo Actions scheduled workflows: daily-snapshots.yml (00:05 UTC) and
  sync-and-simulate.yml (every 2h) — require CRON_SECRET repo secret

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 00:18:41 -07:00
..
__tests__ Fix MLB standings 406 error and refactor ESPN adapter shared code (#62) 2026-06-01 03:31:18 +00:00
afl.ts Fix oxlint errors. 2026-03-22 20:41:44 -07:00
epl.ts Deduplicate soccer simulator helpers (#391) 2026-05-07 11:48:57 -07:00
espn.ts Fix MLB standings 406 error and refactor ESPN adapter shared code (#62) 2026-06-01 03:31:18 +00:00
f1.ts Add regular season standings for NBA/NHL (fixes #89) (#192) 2026-03-21 00:12:01 -07:00
index.ts Add Phase A: external HTTP cron jobs for snapshots, standings sync, and simulation 2026-06-08 00:18:41 -07:00
mlb.ts Fix MLB standings 406 error and refactor ESPN adapter shared code (#62) 2026-06-01 03:31:18 +00:00
mls.ts Fix MLB standings 406 error and refactor ESPN adapter shared code (#62) 2026-06-01 03:31:18 +00:00
nba.ts Fix MLB standings 406 error and refactor ESPN adapter shared code (#62) 2026-06-01 03:31:18 +00:00
nhl.ts Add regular season standings for NBA/NHL (fixes #89) (#192) 2026-03-21 00:12:01 -07:00
thesportsdb.ts Add regular season standings for NBA/NHL (fixes #89) (#192) 2026-03-21 00:12:01 -07:00
types.ts Add Phase A: external HTTP cron jobs for snapshots, standings sync, and simulation 2026-06-08 00:18:41 -07:00
wnba.ts Fix MLB standings 406 error and refactor ESPN adapter shared code (#62) 2026-06-01 03:31:18 +00:00