Permalink
Browse files

Will smart restart apps after node crash

  • Loading branch information...
1 parent f14c03e commit 2c42dfa6120e90bc39f5737cde6bd9656657900f @ranok committed Mar 22, 2010
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/osp_manager.erl
View
@@ -36,7 +36,12 @@ startup() ->
F = fun({App, Port}) ->
start_servlet(App, Port, node())
end,
- lists:foreach(F, osp:get_conf('AUTO_STARTED')),
+ case lists:keyfind(node(), 1, nodeapp()) of
+ false ->
+ lists:foreach(F, osp:get_conf('AUTO_STARTED'));
+ {_, LocalApps} ->
+ lists:foreach(F, LocalApps)
+ end,
Pid = spawn(fun() -> loop() end),
{ok, Pid, osp_web:start()}.
@@ -61,7 +66,7 @@ loop() ->
loop()
end.
-%% @doc The mnesia startup routine for osp_admin
+%% @doc The mnesia startup routine for osp_manager
%% @spec start_mnesia() -> ok
start_mnesia() ->
case lists:member(mnesia_sup, erlang:registered()) of

0 comments on commit 2c42dfa

Please sign in to comment.