diff options
| author | Diana Corbacho <diana.corbacho@erlang-solutions.com> | 2015-10-13 09:57:12 +0100 |
|---|---|---|
| committer | Diana Corbacho <diana.corbacho@erlang-solutions.com> | 2015-10-13 09:58:29 +0100 |
| commit | 87402fad7fe68be84395d4ea8907b6591019357c (patch) | |
| tree | ac8897667c5483ece764c1e8bc3625d0879fa047 /src | |
| parent | 44a0ddb72dc0337235bcecf63878658bac4288a4 (diff) | |
| download | rabbitmq-server-git-87402fad7fe68be84395d4ea8907b6591019357c.tar.gz | |
Read memory monitor interval from configuration
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_memory_monitor.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rabbit_memory_monitor.erl b/src/rabbit_memory_monitor.erl index 7aa29fc423..24b3ae9af4 100644 --- a/src/rabbit_memory_monitor.erl +++ b/src/rabbit_memory_monitor.erl @@ -41,7 +41,6 @@ }). -define(SERVER, ?MODULE). --define(DEFAULT_UPDATE_INTERVAL, 2500). -define(TABLE_NAME, ?MODULE). %% If all queues are pushed to disk (duration 0), then the sum of @@ -110,7 +109,8 @@ memory_use(ratio) -> %%---------------------------------------------------------------------------- init([]) -> - {ok, TRef} = timer:send_interval(?DEFAULT_UPDATE_INTERVAL, update), + {ok, Interval} = application:get_env(rabbit, memory_monitor_interval), + {ok, TRef} = timer:send_interval(Interval, update), Ets = ets:new(?TABLE_NAME, [set, private, {keypos, #process.pid}]), Alarms = rabbit_alarm:register(self(), {?MODULE, conserve_resources, []}), |
