summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2012-03-21 17:25:55 +0000
committerSimon MacMullen <simon@rabbitmq.com>2012-03-21 17:25:55 +0000
commitfcb658f5206c3e8dd3452846a5f0dbb8d4ceb3c2 (patch)
tree696de5d004dd5a43ce3144b41c3c8fae36dcbd9f /src
parent4749890623cda7aa133bfeb338713deec15dab7a (diff)
downloadrabbitmq-server-fcb658f5206c3e8dd3452846a5f0dbb8d4ceb3c2.tar.gz
Notify
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_cluster_config.erl18
-rw-r--r--src/rabbit_cluster_config_item.erl3
2 files changed, 12 insertions, 9 deletions
diff --git a/src/rabbit_cluster_config.erl b/src/rabbit_cluster_config.erl
index d4a84395..7fd963e8 100644
--- a/src/rabbit_cluster_config.erl
+++ b/src/rabbit_cluster_config.erl
@@ -27,14 +27,16 @@ set(AppName, Key, Value) ->
Term = parse(Value),
validate(Term),
Module:validate(Key, Term),
- rabbit_misc:execute_mnesia_transaction(
- fun () ->
- ok = mnesia:write(
- rabbit_cluster_config,
- #cluster_config{key = {AppName, Key},
- value = Term},
- write)
- end).
+ ok = rabbit_misc:execute_mnesia_transaction(
+ fun () ->
+ ok = mnesia:write(
+ rabbit_cluster_config,
+ #cluster_config{key = {AppName, Key},
+ value = Term},
+ write)
+ end),
+ Module:notify(Key, Term),
+ ok.
clear(AppName, Key) ->
rabbit_misc:execute_mnesia_transaction(
diff --git a/src/rabbit_cluster_config_item.erl b/src/rabbit_cluster_config_item.erl
index 4ab903ea..093e92b5 100644
--- a/src/rabbit_cluster_config_item.erl
+++ b/src/rabbit_cluster_config_item.erl
@@ -20,7 +20,8 @@
behaviour_info(callbacks) ->
[
- {validate, 2}
+ {validate, 2},
+ {notify, 2}
];
behaviour_info(_Other) ->
undefined.