mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-12 02:23:44 +00:00
fix(multiplayer): converge events through REST
This commit is contained in:
@@ -13,8 +13,10 @@ import (
|
||||
// RunProposalOutboxDispatcher delivers committed proposal changes to the
|
||||
// authenticated WebSocket subscribers. It only reads proposal_changed rows;
|
||||
// result and other outbox event types remain owned by their own consumers.
|
||||
// Delivery is at-least-once because the row is acknowledged only after every
|
||||
// participant publication succeeds.
|
||||
// The outbox guarantees after-commit publication into this replica's bounded
|
||||
// transient hub; WebSocket receipt is deliberately best-effort. Clients use
|
||||
// owner-scoped periodic REST recovery for correctness across disconnects and
|
||||
// replicas, so a socket notification is only a latency optimization.
|
||||
func RunProposalOutboxDispatcher(ctx context.Context, db *sql.DB, service *Service) {
|
||||
if db == nil || service == nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user