Skip to content

Instantly share code, notes, and snippets.

@greggy
Created November 29, 2011 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greggy/1404489 to your computer and use it in GitHub Desktop.
Save greggy/1404489 to your computer and use it in GitHub Desktop.
count_viewers() ->
[
[lists:flatten(io_lib:format("Node: ~p, Channel: ~p, Viewers: ~p",
[Node, ChannelId,
case rpc:call(Node, proxy, count_viewers, [ChannelId]) of
{badrpc, _} -> "Not proxy";
Res -> Res
end
]))
|| ChannelId <- utils:get_sessions_id(global:registered_names())]
|| Node <- nodes()].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment