1 %%%-------------------------------------------------------------------
4 %%%-------------------------------------------------------------------
7 -behaviour(supervisor
).
8 %%--------------------------------------------------------------------
10 %%--------------------------------------------------------------------
12 %%--------------------------------------------------------------------
14 %%--------------------------------------------------------------------
19 %%--------------------------------------------------------------------
21 %%--------------------------------------------------------------------
26 %%--------------------------------------------------------------------
28 %%--------------------------------------------------------------------
29 -define(SERVER
, ?MODULE
).
31 %%--------------------------------------------------------------------
33 %%--------------------------------------------------------------------
35 %%====================================================================
37 %%====================================================================
38 %%--------------------------------------------------------------------
39 %% @doc Starts the supervisor.
40 %% @spec start_link(StartArgs) -> {ok, pid()} | Error
42 %%--------------------------------------------------------------------
43 start_link(StartArgs
) ->
44 supervisor:start_link({local
, ?SERVER
}, ?MODULE
, []).
46 %%====================================================================
48 %%====================================================================
49 %%--------------------------------------------------------------------
51 %% Returns: {ok, {SupFlags, [ChildSpec]}} |
54 %%--------------------------------------------------------------------
56 RestartStrategy
= one_for_one
,
58 MaxTimeBetRestarts
= 3600,
60 SupFlags
= {RestartStrategy
, MaxRestarts
, MaxTimeBetRestarts
},
65 {%%PFX%%_server, start_link, []},
71 {ok
,{SupFlags
, ChildSpecs
}}.
72 %%====================================================================
74 %%====================================================================