Skip to content

Commit

Permalink
Remove test_change_host
Browse files Browse the repository at this point in the history
  • Loading branch information
johnshaughnessy committed Mar 2, 2023
1 parent 59362e6 commit 37a01f1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
12 changes: 0 additions & 12 deletions lib/ret/hub.ex
Original file line number Diff line number Diff line change
Expand Up @@ -668,18 +668,6 @@ defmodule Ret.Hub do
end
end

def test_change_host(hub) do
host = RoomAssigner.get_available_host(hub.host)

hub |> changeset_for_new_host(host) |> Repo.update!()

RetWeb.Endpoint.broadcast("hub:" <> hub.hub_sid, "host_changed", %{
host: host,
port: Hub.janus_port(),
turn: Hub.generate_turn_info()
})
end

# Remove the host entry from any rooms that are older than a day old and have no presence
def vacuum_hosts do
Ret.Locking.exec_if_lockable(:hub_vacuum_hosts, fn ->
Expand Down
5 changes: 0 additions & 5 deletions lib/ret_web/channels/hub_channel.ex
Original file line number Diff line number Diff line change
Expand Up @@ -712,11 +712,6 @@ defmodule RetWeb.HubChannel do
end
end

def handle_in("test_change_host", _payload, socket) do
Hub.test_change_host(hub_for_socket(socket))
{:noreply, socket}
end

def handle_in(_message, _payload, socket) do
{:noreply, socket}
end
Expand Down

0 comments on commit 37a01f1

Please sign in to comment.