mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 00:14:00 +00:00
feat: reconcile Agones allocations durably
This commit is contained in:
@@ -137,6 +137,10 @@ type queueTicketRecord struct {
|
||||
|
||||
type PostgresQueue struct{ DB *sql.DB }
|
||||
|
||||
func (q PostgresQueue) RecordProviderAllocation(ctx context.Context, allocation domain.Allocation, now time.Time) (domain.Allocation, error) {
|
||||
return RecordProviderAllocation(ctx, q.DB, allocation, now)
|
||||
}
|
||||
|
||||
const QueueProbeRecordSQL = `UPDATE queue_tickets
|
||||
SET predicted_rtt = jsonb_set(COALESCE(predicted_rtt, '{}'::jsonb), ARRAY[$2], to_jsonb($3::double precision), true)
|
||||
WHERE player_id = $1 AND state IN ('QUEUED', 'PROPOSED') AND expires_at > $4`
|
||||
|
||||
Reference in New Issue
Block a user