Streamer: Make it less chatty.

This commit is contained in:
lain 2018-02-21 15:44:00 +01:00
parent 810cf8618f
commit 67afd024a7
1 changed files with 1 additions and 3 deletions

View File

@ -74,7 +74,6 @@ def handle_cast(%{action: :add, topic: topic, socket: socket}, sockets) do
sockets_for_topic = Enum.uniq([socket | sockets_for_topic]) sockets_for_topic = Enum.uniq([socket | sockets_for_topic])
sockets = Map.put(sockets, topic, sockets_for_topic) sockets = Map.put(sockets, topic, sockets_for_topic)
Logger.debug("Got new conn for #{topic}") Logger.debug("Got new conn for #{topic}")
IO.inspect(sockets)
{:noreply, sockets} {:noreply, sockets}
end end
@ -84,12 +83,11 @@ def handle_cast(%{action: :remove, topic: topic, socket: socket}, sockets) do
sockets_for_topic = List.delete(sockets_for_topic, socket) sockets_for_topic = List.delete(sockets_for_topic, socket)
sockets = Map.put(sockets, topic, sockets_for_topic) sockets = Map.put(sockets, topic, sockets_for_topic)
Logger.debug("Removed conn for #{topic}") Logger.debug("Removed conn for #{topic}")
IO.inspect(sockets)
{:noreply, sockets} {:noreply, sockets}
end end
def handle_cast(m, state) do def handle_cast(m, state) do
IO.inspect("Unknown: #{inspect(m)}, #{inspect(state)}") Logger.info("Unknown: #{inspect(m)}, #{inspect(state)}")
{:noreply, state} {:noreply, state}
end end