Skip to content

Commit

Permalink
fix(ex/Realtime.Server): use broadcast_local instead of broadcast (
Browse files Browse the repository at this point in the history
…#2856)

* fix(ex/Realtime.Server): use `broadcast_local` instead of `broadcast`

* fix: re-enable `DNSCluster`

Reverts: #2854
  • Loading branch information
firestack authored Oct 15, 2024
1 parent 08dc1eb commit 945a2e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,5 @@ if config_env() == :prod do
config :skate, Skate.Detours.TripModificationPublisher, start: true
end

# There are currently issues with Distributed Elixir and our Data Pipelines.
# So we need to disable clustering in prod until we figure this out
# config :skate, DNSCluster, query: System.get_env("DNS_CLUSTER_QUERY") || :ignore
config :skate, DNSCluster, query: System.get_env("DNS_CLUSTER_QUERY") || :ignore
end
2 changes: 1 addition & 1 deletion lib/realtime/server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ defmodule Realtime.Server do
:alerts -> "realtime_alerts"
end

Phoenix.PubSub.broadcast(pubsub_name(), topic, {:new_realtime_data, state.ets})
Phoenix.PubSub.local_broadcast(pubsub_name(), topic, {:new_realtime_data, state.ets})
end

@spec block_is_active?(VehicleOrGhost.t()) :: boolean
Expand Down

0 comments on commit 945a2e9

Please sign in to comment.