diff options
Diffstat (limited to 'src/app_utils.erl')
-rw-r--r-- | src/app_utils.erl | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/app_utils.erl b/src/app_utils.erl index 0479ce66..87e6fa0b 100644 --- a/src/app_utils.erl +++ b/src/app_utils.erl @@ -17,7 +17,7 @@ -export([load_applications/1, start_applications/1, start_applications/2, stop_applications/1, stop_applications/2, app_dependency_order/2, - wait_for_applications/1]). + app_dependencies/1]). -ifdef(use_specs). @@ -28,8 +28,8 @@ -spec stop_applications([atom()]) -> 'ok'. -spec start_applications([atom()], error_handler()) -> 'ok'. -spec stop_applications([atom()], error_handler()) -> 'ok'. --spec wait_for_applications([atom()]) -> 'ok'. -spec app_dependency_order([atom()], boolean()) -> [digraph:vertex()]. +-spec app_dependencies(atom()) -> [atom()]. -endif. @@ -68,14 +68,10 @@ stop_applications(Apps, ErrorHandler) -> ErrorHandler, Apps). - -wait_for_applications(Apps) -> - [wait_for_application(App) || App <- Apps], ok. - app_dependency_order(RootApps, StripUnreachable) -> {ok, G} = rabbit_misc:build_acyclic_graph( - fun (App, _Deps) -> [{App, App}] end, - fun (App, Deps) -> [{Dep, App} || Dep <- Deps] end, + fun ({App, _Deps}) -> [{App, App}] end, + fun ({App, Deps}) -> [{Dep, App} || Dep <- Deps] end, [{App, app_dependencies(App)} || {App, _Desc, _Vsn} <- application:loaded_applications()]), try @@ -92,13 +88,6 @@ app_dependency_order(RootApps, StripUnreachable) -> %%--------------------------------------------------------------------------- %% Private API -wait_for_application(Application) -> - case lists:keymember(Application, 1, rabbit_misc:which_applications()) of - true -> ok; - false -> timer:sleep(1000), - wait_for_application(Application) - end. - load_applications(Worklist, Loaded) -> case queue:out(Worklist) of {empty, _WorkList} -> |