You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2020/01/06 18:27:13 UTC

[couchdb] 13/19: Remove unused code

This is an automated email from the ASF dual-hosted git repository.

kocolosk pushed a commit to branch ioq-in-tree
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 5f5375a0d4fb1ceae9a14ba28ad991ff020a9c9e
Author: Eric Avdey <ei...@eiri.ca>
AuthorDate: Mon Oct 3 11:42:02 2016 -0300

    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.
---
 src/ioq_sup.erl | 23 +----------------------
 1 file changed, 1 insertion(+), 22 deletions(-)

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)]}}.