mirror of
https://github.com/guilhermewerner/erlang-ws
synced 2025-06-16 19:34:20 +00:00
Update events
This commit is contained in:
28
broken/erws_sup.erl
Normal file
28
broken/erws_sup.erl
Normal file
@ -0,0 +1,28 @@
|
||||
%% Feel free to use, reuse and abuse the code in this file.
|
||||
|
||||
%% @private
|
||||
-module(erws_sup).
|
||||
-behaviour(supervisor).
|
||||
|
||||
%% API
|
||||
-export([start_link/0]).
|
||||
|
||||
%% Supervisor callbacks
|
||||
-export([init/1]).
|
||||
|
||||
%% Helper macro for declaring children of supervisor
|
||||
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
|
||||
|
||||
%% ===================================================================
|
||||
%% API functions
|
||||
%% ===================================================================
|
||||
|
||||
start_link() ->
|
||||
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
|
||||
|
||||
%% ===================================================================
|
||||
%% Supervisor callbacks
|
||||
%% ===================================================================
|
||||
|
||||
init([]) ->
|
||||
{ok, {{one_for_one, 5, 10}, [?CHILD(chat_room, worker)]}}.
|
Reference in New Issue
Block a user