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 | 7ee15f72a6a617f78c524169b99e73aed3fbc5ec (patch) | |
| tree | af00688997738ae6b2fb878848ef97e491d4bc2a | |
| parent | 4ae397a5a1a2edb7cf7dfbde8b27bb0ff1c58818 (diff) | |
| download | rabbitmq-server-git-7ee15f72a6a617f78c524169b99e73aed3fbc5ec.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 d3cd1a63e8..b867223b50 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 2f10e0a0b7..f6860424d0 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. |
