Fix stale match liveness and stop handling (Refs #136)
CI / checks (push) Successful in 5m15s
CI / checks (push) Successful in 5m15s
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user