Repository: couchdb-ioq Updated Branches: refs/heads/master ba99ec70d -> 1d2b149ee
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. Project: http://git-wip-us.apache.org/repos/asf/couchdb-ioq/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ioq/commit/5f5375a0 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ioq/tree/5f5375a0 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ioq/diff/5f5375a0 Branch: refs/heads/master Commit: 5f5375a0d4fb1ceae9a14ba28ad991ff020a9c9e Parents: ba99ec7 Author: Eric Avdey <e...@eiri.ca> Authored: Mon Oct 3 11:42:02 2016 -0300 Committer: Eric Avdey <e...@eiri.ca> Committed: Mon Oct 3 12:05:32 2016 -0300 ---------------------------------------------------------------------- src/ioq_sup.erl | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-ioq/blob/5f5375a0/src/ioq_sup.erl ---------------------------------------------------------------------- diff --git a/src/ioq_sup.erl b/src/ioq_sup.erl index fa919e4..c4d04a9 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)]}}.