Skip to content

Commit 208f05d

Browse files
committed
chore: refactor notifier to avoid compile warning
1 parent e456fae commit 208f05d

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

dev/notifier.ex

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,16 @@ defmodule Demo.BlobNotifier do
22
@moduledoc false
33
use Ash.Notifier
44

5-
@impl true
6-
def notify(%Ash.Notifier.Notification{action: %{name: :run_pending_analyzers}} = notification) do
75
if Code.ensure_loaded?(Phoenix.PubSub) do
8-
Phoenix.PubSub.broadcast(
9-
Demo.PubSub,
10-
"blob_analysis",
11-
{:analysis_complete, notification.data}
12-
)
13-
else
14-
:ok
6+
@impl true
7+
def notify(%Ash.Notifier.Notification{action: %{name: :run_pending_analyzers}} = notification) do
8+
Phoenix.PubSub.broadcast(
9+
Demo.PubSub,
10+
"blob_analysis",
11+
{:analysis_complete, notification.data}
12+
)
13+
end
1514
end
16-
end
1715

1816
def notify(_), do: :ok
1917
end

0 commit comments

Comments
 (0)