diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2014-06-05 16:31:57 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2014-06-05 16:31:57 +0100 |
commit | 7d6c1d8b723a84b8b242fc8d1ff6cbb281a15d24 (patch) | |
tree | af00688997738ae6b2fb878848ef97e491d4bc2a | |
parent | 419ed844f2beb1b6fcc79cb55b7b83fedf97e812 (diff) | |
download | rabbitmq-server-7d6c1d8b723a84b8b242fc8d1ff6cbb281a15d24.tar.gz |
Remove sync_notify, it doesn't seem to be needed.
-rw-r--r-- | src/rabbit_event.erl | 24 | ||||
-rw-r--r-- | src/rabbit_plugins.erl | 2 |
2 files changed, 5 insertions, 21 deletions
diff --git a/src/rabbit_event.erl b/src/rabbit_event.erl index d3cd1a63..b867223b 100644 --- a/src/rabbit_event.erl +++ b/src/rabbit_event.erl @@ -23,7 +23,6 @@ ensure_stats_timer/3, stop_stats_timer/2, reset_stats_timer/2]). -export([stats_level/2, if_enabled/3]). -export([notify/2, notify/3, notify_if/3]). --export([sync_notify/2, sync_notify/3]). %%---------------------------------------------------------------------------- @@ -62,9 +61,6 @@ -spec(notify/2 :: (event_type(), event_props()) -> 'ok'). -spec(notify/3 :: (event_type(), event_props(), reference() | 'none') -> 'ok'). -spec(notify_if/3 :: (boolean(), event_type(), event_props()) -> 'ok'). --spec(sync_notify/2 :: (event_type(), event_props()) -> 'ok'). --spec(sync_notify/3 :: (event_type(), event_props(), - reference() | 'none') -> 'ok'). -endif. @@ -149,19 +145,7 @@ notify_if(false, _Type, _Props) -> ok. notify(Type, Props) -> notify(Type, Props, none). notify(Type, Props, Ref) -> - do_notify(notify, #event{type = Type, - props = Props, - reference = Ref, - timestamp = os:timestamp()}). - -sync_notify(Type, Props) -> sync_notify(Type, Props, none). - -sync_notify(Type, Props, Ref) -> - do_notify(sync_notify, #event{type = Type, - props = Props, - reference = Ref, - timestamp = os:timestamp()}). - -do_notify(F, Event) -> - apply(gen_event, F, [?MODULE, Event]). - + gen_event:notify(?MODULE, #event{type = Type, + props = Props, + reference = Ref, + timestamp = os:timestamp()}). diff --git a/src/rabbit_plugins.erl b/src/rabbit_plugins.erl index 2f10e0a0..f6860424 100644 --- a/src/rabbit_plugins.erl +++ b/src/rabbit_plugins.erl @@ -47,7 +47,7 @@ disable(Plugins) -> RunningApps = rabbit_misc:which_applications(), ToDisable = [P || P <- Plugins, proplists:is_defined(P, RunningApps)], - ok = rabbit_event:sync_notify(plugins_changed, [{disabled, ToDisable}]), + ok = rabbit_event:notify(plugins_changed, [{disabled, ToDisable}]), rabbit:stop_apps(ToDisable). %% @doc Prepares the file system and installs all enabled plugins. |