summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-11-02 23:57:34 +0100
committerDimitri Sokolyuk <demon@dim13.org>2015-11-02 23:57:34 +0100
commit2a177261469160d66f95ac4c1a62349fc48b3696 (patch)
tree057a14d4d44e3977a1741cd060089c02a2fb13c8
parent4ee8fd87719428159c1a059f8aa13ecb2d18b2b8 (diff)
Remove clutter
-rw-r--r--src/pbx_app.erl7
-rw-r--r--src/pbx_sup.erl17
2 files changed, 4 insertions, 20 deletions
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) ]
+ } }.