From 2a177261469160d66f95ac4c1a62349fc48b3696 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Mon, 2 Nov 2015 23:57:34 +0100 Subject: Remove clutter --- src/pbx_app.erl | 7 ------- src/pbx_sup.erl | 17 ++++------------- 2 files changed, 4 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/pbx_app.erl b/src/pbx_app.erl index 6d244ba..76f470c 100644 --- a/src/pbx_app.erl +++ b/src/pbx_app.erl @@ -1,14 +1,7 @@ -module(pbx_app). - -behaviour(application). - -%% Application callbacks -export([start/2, stop/1]). -%% =================================================================== -%% Application callbacks -%% =================================================================== - start(_StartType, _StartArgs) -> pbx_sup:start_link(). diff --git a/src/pbx_sup.erl b/src/pbx_sup.erl index c9fa66a..9dd7f60 100644 --- a/src/pbx_sup.erl +++ b/src/pbx_sup.erl @@ -2,26 +2,17 @@ -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}, []} }. + {ok, { + {one_for_one, 5, 10}, + [ ?CHILD(tda, worker) ] + } }. -- cgit v1.2.3