CRITICAL FIX (Nov 30, 2025):
- Dashboard showed 'idle' despite 22+ worker processes running
- Root cause: SSH-based worker detection timing out
- Solution: Check database for running chunks FIRST
Changes:
1. app/api/cluster/status/route.ts:
- Query exploration database before SSH detection
- If running chunks exist, mark workers 'active' even if SSH fails
- Override worker status: 'offline' → 'active' when chunks running
- Log: '✅ Cluster status: ACTIVE (database shows running chunks)'
- Database is source of truth, SSH only for supplementary metrics
2. app/cluster/page.tsx:
- Stop button ALREADY EXISTS (conditionally shown)
- Shows Start when status='idle', Stop when status='active'
- No code changes needed - fixed by status detection
Result:
- Dashboard now shows 'ACTIVE' with 2 workers (correct)
- Workers show 'active' status (was 'offline')
- Stop button automatically visible when cluster active
- System resilient to SSH timeouts/network issues
Verified:
- Container restarted: Nov 30 21:18 UTC
- API tested: Returns status='active', activeWorkers=2
- Logs confirm: Database-first logic working
- Workers confirmed running: 22+ processes on worker1, workers on worker2
43 lines
1.1 KiB
JSON
43 lines
1.1 KiB
JSON
{
|
|
"name": "trading-bot-v4",
|
|
"version": "4.0.0",
|
|
"description": "Autonomous Trading Bot v4 with Drift Protocol and Pyth Network integration",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "next lint"
|
|
},
|
|
"dependencies": {
|
|
"@drift-labs/sdk": "^2.75.0",
|
|
"@prisma/client": "^6.18.0",
|
|
"@pythnetwork/hermes-client": "^1.0.0",
|
|
"@pythnetwork/price-service-client": "^1.3.0",
|
|
"@solana/web3.js": "^1.91.1",
|
|
"@types/better-sqlite3": "^7.6.13",
|
|
"autoprefixer": "^10.4.21",
|
|
"bn.js": "^5.2.2",
|
|
"bs58": "^5.0.0",
|
|
"next": "^15.0.0",
|
|
"postcss": "^8.5.6",
|
|
"prisma": "^6.18.0",
|
|
"react": "^18.3.0",
|
|
"react-dom": "^18.3.0",
|
|
"sqlite": "^5.1.1",
|
|
"sqlite3": "^5.1.7",
|
|
"tailwindcss": "^3.4.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bn.js": "^5.2.0",
|
|
"@types/node": "^20.11.0",
|
|
"@types/react": "^18.2.0",
|
|
"@types/react-dom": "^18.2.0",
|
|
"ts-node": "^10.9.2",
|
|
"typescript": "^5.3.0"
|
|
},
|
|
"engines": {
|
|
"node": ">=20.0.0"
|
|
}
|
|
}
|