summaryrefslogtreecommitdiff
path: root/src/rabbit_runtime_parameters.erl
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2012-03-26 18:25:34 +0100
committerSimon MacMullen <simon@rabbitmq.com>2012-03-26 18:25:34 +0100
commitc9454eb81315d2e9d02c2dd4027c15e8b51efb5a (patch)
treea85dd6f700e58af5b83c3e0d7c6da4786dd9f372 /src/rabbit_runtime_parameters.erl
parent0821b1d5159549590898bc87300c0aa7ec008cb2 (diff)
downloadrabbitmq-server-c9454eb81315d2e9d02c2dd4027c15e8b51efb5a.tar.gz
Rearrange for mgmt.
Diffstat (limited to 'src/rabbit_runtime_parameters.erl')
-rw-r--r--src/rabbit_runtime_parameters.erl11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/rabbit_runtime_parameters.erl b/src/rabbit_runtime_parameters.erl
index 47843552..1ba38ec8 100644
--- a/src/rabbit_runtime_parameters.erl
+++ b/src/rabbit_runtime_parameters.erl
@@ -18,7 +18,9 @@
-include("rabbit.hrl").
--export([set/3, clear/2, list/0, lookup/3, info_keys/0]).
+-export([set/3, clear/2, list/0, list_formatted/0, lookup/3, info_keys/0]).
+
+-import(rabbit_misc, [pget/2, pset/3]).
-define(TABLE, rabbit_runtime_parameters).
@@ -46,8 +48,11 @@ list() ->
All = rabbit_misc:dirty_read_all(?TABLE),
[[{app_name, AppName},
{key, Key},
- {value, format(Value)}] || #runtime_parameters{key = {AppName, Key},
- value = Value} <- All].
+ {value, Value}] || #runtime_parameters{key = {AppName, Key},
+ value = Value} <- All].
+
+list_formatted() ->
+ [pset(value, format(pget(value, P)), P) || P <- list()].
lookup(AppName, Key, Default) ->
case mnesia:dirty_read(?TABLE, {AppName, Key}) of