Skip to content

Commit

Permalink
setup_srv: have timeout configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
Meike Hecker committed May 18, 2016
1 parent 1d87014 commit aefeb8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/setup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
%% the environment variable `{verify_directories, false}'. This can be desirable
%% if setup is used mainly e.g. for environment variable expansion, but not for
%% disk storage.
%% * `{timeout, integer()}' - time to wait for run_setup to finish
%% @end
-module(setup).

Expand Down
3 changes: 2 additions & 1 deletion src/setup_srv.erl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ start_link() ->
gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).

run_setup() ->
gen_server:call(?MODULE, run_setup).
Timeout = setup:get_env(setup, timeout, 5000),
gen_server:call(?MODULE, run_setup, Timeout).

init(_) ->
{ok, []}.
Expand Down

0 comments on commit aefeb8e

Please sign in to comment.