fix: reset is_online on server start, reduce heartbeat to 20s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-27 20:08:43 +03:00
parent 0e51f8326a
commit 83eff2b0c6
2 changed files with 5 additions and 1 deletions

View File

@@ -24,6 +24,10 @@ async function main() {
await runMigrations()
await seedIfEmpty()
// При рестарте сервера все агенты считаются офлайн — они переподключатся сами
await db.query('UPDATE workstations SET is_online = false').catch(() => {})
console.log('[server] Reset all workstations to offline')
await redis.connect()
console.log('[redis] Connected')