Instances were started by hand and updated by hand, so they drifted behind master silently. Now: PM2 supervises the dashboard and the clicker, a logon task brings them up, and a 5-minute task pulls, rebuilds and restarts when master moves. Restarting on every push is only safe because the scheduler now survives it. It was pure in-memory state (_global.__autoTrader), so any restart silently stopped automated trading with the dashboard simply showing it as off. It now mirrors running/action/symbol/stopAfterAll to the settings table, and resumeSchedulerIfPersisted() picks it back up from the getClients() bootstrap. No sync-wait was needed there: tick() already skips while a client reports !syncComplete and while any account holds a position. A failed build is never deployed — the build runs before anything restarts, so a broken push leaves the previous build serving. start-all and update-check both warm the app with a request afterwards. That is load-bearing: getClients() is lazily bootstrapped, so until something makes an HTTP request the Tradovate clients, the reporter and the resumed schedule never start. That was already true of manual restarts. Logic lives in Node so a macOS or Linux port only needs an equivalent of install-autostart.ps1. Python deps are hash-guarded, so the common path is one hash and one import with no network, and failure is non-fatal since only the clicker needs them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
62 lines
783 B
Plaintext
62 lines
783 B
Plaintext
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
|
|
# dependencies
|
|
/node_modules
|
|
/.pnp
|
|
.pnp.*
|
|
.yarn/*
|
|
!.yarn/patches
|
|
!.yarn/plugins
|
|
!.yarn/releases
|
|
!.yarn/versions
|
|
|
|
# testing
|
|
/coverage
|
|
|
|
# next.js
|
|
/.next/
|
|
/out/
|
|
|
|
# production
|
|
/build
|
|
|
|
# misc
|
|
.DS_Store
|
|
*.pem
|
|
|
|
# debug
|
|
npm-debug.log*
|
|
yarn-debug.log*
|
|
yarn-error.log*
|
|
.pnpm-debug.log*
|
|
|
|
# env files (can opt-in for committing if needed)
|
|
.env*
|
|
|
|
# vercel
|
|
.vercel
|
|
|
|
# typescript
|
|
*.tsbuildinfo
|
|
next-env.d.ts
|
|
|
|
# local runtime artifacts
|
|
*.sqlite
|
|
dev.log
|
|
dev.err
|
|
nul
|
|
scripts/lucid-cookies.json
|
|
scripts/lucid-config.json
|
|
scripts/*.png
|
|
autotrader.sqlite
|
|
|
|
# python
|
|
__pycache__/
|
|
*.pyc
|
|
|
|
# generated by the Windows setup / autostart scripts
|
|
scripts/.deps-hash
|
|
scripts/.python-cmd
|
|
scripts/.update.lock
|
|
scripts/update.log
|