Skip to content

Commit

Permalink
Add option to delay Riak startup (useful during testing/mocking)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtuple committed Apr 2, 2012
1 parent f751911 commit 67aaf78
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/riak_core_app.erl
Expand Up @@ -36,6 +36,14 @@ start(_StartType, _StartArgs) ->
%% riak_core_sysmon_minder start it, because that process can act
%% on any handler crash notification, whereas we cannot.

case application:get_env(riak_core, delayed_start) of
{ok, Delay} ->
lager:info("Delaying riak_core startup as requested"),
timer:sleep(Delay);
_ ->
ok
end,

%% Validate that the ring state directory exists
riak_core_util:start_app_deps(riak_core),
RingStateDir = app_helper:get_env(riak_core, ring_state_dir),
Expand Down

0 comments on commit 67aaf78

Please sign in to comment.