From a76552eb6823c5360c7e3f4939fc5fae35396e78 Mon Sep 17 00:00:00 2001 From: Chase Granberry Date: Fri, 19 Jul 2024 13:58:10 -0700 Subject: [PATCH] fix: local broadcast transaction broadcaster (#2153) * fix: just do a local_broadcast here * fix: not used * fix: bump version --- VERSION | 2 +- lib/logflare/context_cache/supervisor.ex | 1 - lib/logflare/context_cache/transaction_broadcaster.ex | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 5cb12d09a..b78c9b1eb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.7.12 \ No newline at end of file +1.7.13 \ No newline at end of file diff --git a/lib/logflare/context_cache/supervisor.ex b/lib/logflare/context_cache/supervisor.ex index 1b9c13ff8..e5447fe1d 100644 --- a/lib/logflare/context_cache/supervisor.ex +++ b/lib/logflare/context_cache/supervisor.ex @@ -65,7 +65,6 @@ defmodule Logflare.ContextCache.Supervisor do """ def maybe_start_cainophile do spec = cainophile_child_spec() - Supervisor.which_children(__MODULE__) Supervisor.start_child(__MODULE__, spec) end diff --git a/lib/logflare/context_cache/transaction_broadcaster.ex b/lib/logflare/context_cache/transaction_broadcaster.ex index 1724c8a54..2f6204322 100644 --- a/lib/logflare/context_cache/transaction_broadcaster.ex +++ b/lib/logflare/context_cache/transaction_broadcaster.ex @@ -47,7 +47,7 @@ defmodule Logflare.ContextCache.TransactionBroadcaster do def handle_info(%Transaction{changes: _changes} = transaction, state) do Logger.debug("WAL record received from cainophile: #{inspect(transaction)}") # broadcast it - Phoenix.PubSub.broadcast(Logflare.PubSub, "wal_transactions", transaction) + Phoenix.PubSub.local_broadcast(Logflare.PubSub, "wal_transactions", transaction) {:noreply, state} end