Github user rnewson commented on a diff in the pull request: https://github.com/apache/couchdb-couch-epi/pull/10#discussion_r39284268 --- Diff: src/couch_epi_sup.erl --- @@ -42,3 +48,36 @@ init([]) -> ?SUP(couch_epi_keeper_sup, []) ], {ok, { {one_for_one, 5, 10}, Children} }. + +%% =================================================================== +%% Internal functions definitions +%% =================================================================== + +start_plugins() -> + Plugins = application:get_env(couch_epi, plugins, []), + io:format(user, "PLUGS: ~p~n", [Plugins]), + ensure_started(Plugins). + +ensure_started(Apps) -> + start_applications(Apps, []). + +start_applications([], _Acc) -> + ok; +start_applications([couch_epi|Apps], Acc) -> + start_applications(Apps, Acc); +start_applications([App|Apps], Acc) -> + case not lists:member(App, Acc) of + true -> + case application:start(App) of --- End diff -- I'm not comfortable with starting applications here, given that should be taken care of by the erlang release mechanism. I can't think of an alternative right now but we should find one.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---