From 1fbd4b7d3971f08148c70b00054da60437f1e920 Mon Sep 17 00:00:00 2001 From: Simon MacMullen Date: Wed, 5 Feb 2014 14:36:29 +0000 Subject: I don't think we do need to notify. Also, add specs. --- src/rabbit_runtime_parameters.erl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/rabbit_runtime_parameters.erl b/src/rabbit_runtime_parameters.erl index 69f2f524..35b3aace 100644 --- a/src/rabbit_runtime_parameters.erl +++ b/src/rabbit_runtime_parameters.erl @@ -36,6 +36,7 @@ -> ok_or_error_string()). -spec(set_any/4 :: (rabbit_types:vhost(), binary(), binary(), term()) -> ok_or_error_string()). +-spec(set_global/2 :: (atom(), term()) -> 'ok'). -spec(clear/3 :: (rabbit_types:vhost(), binary(), binary()) -> ok_or_error_string()). -spec(clear_any/3 :: (rabbit_types:vhost(), binary(), binary()) @@ -50,6 +51,8 @@ -> rabbit_types:infos() | 'not_found'). -spec(value/3 :: (rabbit_types:vhost(), binary(), binary()) -> term()). -spec(value/4 :: (rabbit_types:vhost(), binary(), binary(), term()) -> term()). +-spec(value_global/1 :: (atom()) -> term() | 'not_found'). +-spec(value_global/2 :: (atom(), term()) -> term()). -spec(info_keys/0 :: () -> rabbit_types:info_keys()). -endif. @@ -77,10 +80,8 @@ set(VHost, Component, Name, Term) -> set_any(VHost, Component, Name, Term). set_global(Name, Term) -> - case mnesia_update(Name, Term) of - {old, Term} -> ok; - _ -> ok %% TODO notify - end. + mnesia_update(Name, Term), + ok. format_error(L) -> {error_string, rabbit_misc:format_many([{"Validation failed~n", []} | L])}. -- cgit v1.2.1