diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-04 22:03:12 +0100 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-04 22:03:12 +0100 |
commit | 72fc5b19b17bf5ba9ef51f66e93544d88136855b (patch) | |
tree | 18d5602d9e51ed1cd829a719368e968ad2097e9a | |
parent | bfecb34059a760e44404d773d560fa74b3860497 (diff) | |
download | rabbitmq-server-72fc5b19b17bf5ba9ef51f66e93544d88136855b.tar.gz |
hide rabbit_event initialisation detailsbug23077
-rw-r--r-- | src/rabbit.erl | 2 | ||||
-rw-r--r-- | src/rabbit_event.erl | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index 697a77ff..41c628a0 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -92,7 +92,7 @@ -rabbit_boot_step({rabbit_event, [{description, "statistics event manager"}, {mfa, {rabbit_sup, start_restartable_child, - [gen_event, [{local, rabbit_event}]]}}, + [rabbit_event]}}, {requires, external_infrastructure}, {enables, kernel_ready}]}). diff --git a/src/rabbit_event.erl b/src/rabbit_event.erl index 0639b396..113ffcb4 100644 --- a/src/rabbit_event.erl +++ b/src/rabbit_event.erl @@ -33,6 +33,7 @@ -include("rabbit.hrl"). +-export([start_link/0]). -export([init_stats_timer/0, ensure_stats_timer/3, stop_stats_timer/2]). -export([ensure_stats_timer_after/2, reset_stats_timer_after/1]). -export([stats_level/1]). @@ -68,6 +69,7 @@ -type(timer_fun() :: fun (() -> 'ok')). +-spec(start_link/0 :: () -> rabbit_types:ok_or_error2(pid(), any())). -spec(init_stats_timer/0 :: () -> state()). -spec(ensure_stats_timer/3 :: (state(), timer_fun(), timer_fun()) -> state()). -spec(stop_stats_timer/2 :: (state(), timer_fun()) -> state()). @@ -80,6 +82,9 @@ %%---------------------------------------------------------------------------- +start_link() -> + gen_event:start_link({local, ?MODULE}). + init_stats_timer() -> {ok, StatsLevel} = application:get_env(rabbit, collect_statistics), #state{level = StatsLevel, timer = undefined}. |