diff options
author | Linus Nordberg <linus@nordberg.se> | 2014-05-29 12:40:30 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2014-05-29 12:40:30 +0200 |
commit | c089feb248821a1f0d5ccaf7e415f7347b1fd09a (patch) | |
tree | 8229cddaec5a206bc5498d139d90b2e9aa7df750 /src | |
parent | ff229367ecce3442ba369ddc25dfc1baad732959 (diff) |
Start db prior to plop.
So that plop can read the database at startup.
Diffstat (limited to 'src')
-rw-r--r-- | src/plop_sup.erl | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/plop_sup.erl b/src/plop_sup.erl index 08ccdcb..1c6602c 100644 --- a/src/plop_sup.erl +++ b/src/plop_sup.erl @@ -5,7 +5,6 @@ -export([start_in_shell/1]). start_link(Args) -> - io:format("plop_sup:start_link got args ~p~n", [Args]), supervisor:start_link({local, ?MODULE}, ?MODULE, Args). %% For testing. @@ -16,14 +15,13 @@ start_in_shell(Args) -> %% Supervisor callback init(Args) -> {ok, {{one_for_one, 3, 10}, - [{the_plop, - {plop, start_link, Args}, % All arguments go to plop. - permanent, - 10000, % Shut down within 10s. - worker, [plop]}, - {the_db, + [{the_db, {db, start_link, []}, permanent, 10000, - worker, [db]} - ]}}. + worker, [db]}, + {the_plop, + {plop, start_link, Args}, % All arguments go to plop. + permanent, + 10000, % Shut down within 10s. + worker, [plop]}]}}. |