mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 00:14:00 +00:00
fix(multiplayer): repair PostgreSQL integration invariants
This commit is contained in:
@@ -44,7 +44,7 @@ const ExpireStalledAllocationsSQL = `WITH stalled AS (
|
||||
'event', 'state_changed',
|
||||
'revision', failed.revision,
|
||||
'resource_id', failed.match_id,
|
||||
'occurred_at', $4,
|
||||
'occurred_at', $4::timestamptz,
|
||||
'state', 'FAILED',
|
||||
'match_id', failed.match_id,
|
||||
'player_ids', COALESCE((
|
||||
@@ -54,6 +54,7 @@ const ExpireStalledAllocationsSQL = `WITH stalled AS (
|
||||
)
|
||||
FROM failed
|
||||
ON CONFLICT DO NOTHING
|
||||
RETURNING event_id
|
||||
)
|
||||
SELECT (SELECT count(*) FROM failed), (SELECT count(*) FROM requeued), (SELECT count(*) FROM events)`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user