Skip to content

Instantly share code, notes, and snippets.

@NTCoding
Created March 23, 2013 20:16
Show Gist options
  • Select an option

  • Save NTCoding/5229196 to your computer and use it in GitHub Desktop.

Select an option

Save NTCoding/5229196 to your computer and use it in GitHub Desktop.
riak_core_app
-module(riak_core_app).
-behaviour(application).
%% Application callbacks
-export([start/2, prep_stop/1, stop/1]).
%% ===================================================================
%% Application callbacks
%% ===================================================================
start(_StartType, _StartArgs) ->
%% Don't add our system_monitor event handler here. Instead, let
%% 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,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment