summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Avdey <eiri@eiri.ca>2016-10-03 11:42:02 -0300
committerEric Avdey <eiri@eiri.ca>2016-10-03 12:05:32 -0300
commit5f5375a0d4fb1ceae9a14ba28ad991ff020a9c9e (patch)
tree8593fe1e3c5d43b16e6ce3ac326bc012cf639c1b
parentba99ec70d31cf82fe4868ab4bb92b0978f4fe67f (diff)
downloadcouchdb-5f5375a0d4fb1ceae9a14ba28ad991ff020a9c9e.tar.gz
Remove unused code
We are subscribing both ioq and ioq_sup to config_event, but while ioq is actually processing config changes, ioq_sup just sends uncatched messages to unexisting ioq_server.
-rw-r--r--src/ioq_sup.erl23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/ioq_sup.erl b/src/ioq_sup.erl
index fa919e4c5..c4d04a9e4 100644
--- a/src/ioq_sup.erl
+++ b/src/ioq_sup.erl
@@ -13,7 +13,6 @@
-module(ioq_sup).
-behaviour(supervisor).
-export([start_link/0, init/1]).
--export([handle_config_change/5, handle_config_terminate/3]).
%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
@@ -22,24 +21,4 @@ start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
- {ok, { {one_for_one, 5, 10}, [
- {
- config_listener_mon,
- {config_listener_mon, start_link, [?MODULE, nil]},
- permanent,
- 5000,
- worker,
- [config_listener_mon]
- },
- ?CHILD(ioq, worker)
- ]} }.
-
-handle_config_change("ioq", _Key, _Val, _Persist, St) ->
- gen_server:cast(ioq_server, update_config),
- {ok, St};
-handle_config_change(_Sec, _Key, _Val, _Persist, St) ->
- {ok, St}.
-
-handle_config_terminate(_Server, _Reason, _State) ->
- gen_server:cast(ioq_server, update_config),
- ok.
+ {ok, { {one_for_one, 5, 10}, [?CHILD(ioq, worker)]}}.