aboutsummaryrefslogtreecommitdiffstats
path: root/src/mysqlerl_sup.erl
blob: 1ebfbf293d5d12191f9f74b290355df1fdf73270 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
-module(mysqlerl_sup).
-author('bjc@kublai.com').

-behavior(supervisor).

-export([start_link/0, init/1]).

start_link() ->
    supervisor:start_link({local, ?MODULE}, ?MODULE, []).

init([]) ->
    ConnectionSup = {mysqlerl_connection_sup,
                     {mysqlerl_connection_sup, start_link, []},
                     permanent, infinity, supervisor,
                     [mysqlerl_connection_sup]},
    {ok, {{one_for_one, 10, 5}, [ConnectionSup]}}.