I am trying to trace a problem with pubsub. I confirmed, through logging, that subscription event should get triggered, but client is not receiving it. So I suspect that subscriber loses subscription somewhere along the way. It would be helpful to list all subscribers at the time the message is sent.
object :lock_subscriptions do
...
field :lock_freed, non_null(:lock_result) do
arg(:lock_input, non_null(:lock_input))
config(fn
%{lock_input: %{id: target_id, target_type: target_type}}, _ ->
{:ok, topic: "#{@lock_freed_prefix}:#{target_type}:#{target_id}"}
end)
trigger(:release_lock,
topic: fn
%{success: true, id: target_id, target_type: target_type} ->
"#{@lock_freed_prefix}:#{target_type}:#{target_id}"
|> IO.inspect(label: "SUBSCRIPTION: LOCK-FREED triggered: ")
other ->
other |> IO.inspect(label: "SUBSCRIPTION: NOT FREED")
"not-freed_do-not-publish"
end
)
end