Fix stale match liveness and stop handling (Refs #136)
CI / checks (push) Successful in 5m15s

This commit is contained in:
2026-10-10 19:30:51 -04:00
parent e3e740cea3
commit 03e2d08a38
10 changed files with 211 additions and 24 deletions
+14 -6
View File
@@ -1551,12 +1551,20 @@ async function processJob(job: Job, eligibility: (job: Job) => string | null) {
hold(job, 'Waiting for the agent to verify a stopped container.');
return;
}
db()
.prepare(
'UPDATE servers SET container_state=?,last_players=NULL,last_roster=NULL WHERE name=?'
)
.run(health.state, job.server);
complete(job);
db().transaction(() => {
db()
.prepare(
'UPDATE servers SET container_state=?,last_players=NULL,last_roster=NULL WHERE name=?'
)
.run(health.state, job.server);
db()
.prepare(
`UPDATE leaderboard_matches SET status='interrupted', ended_at=?
WHERE server=? AND status='active' AND server_deleted_at IS NULL`
)
.run(containerObservedAt, job.server);
complete(job);
})();
return;
}
check(