You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2017/10/09 06:14:44 UTC
[couchdb] 05/07: s,init/0,init_state/0,
This is an automated email from the ASF dual-hosted git repository.
jan pushed a commit to branch 749-fix-couch_peruser-app-structure
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 3a426db2c894223d4375fa8f907ed616e8334966
Author: Jan Lehnardt <ja...@apache.org>
AuthorDate: Mon Oct 9 08:10:52 2017 +0200
s,init/0,init_state/0,
---
src/couch_peruser/src/couch_peruser.erl | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/couch_peruser/src/couch_peruser.erl b/src/couch_peruser/src/couch_peruser.erl
index bda74ec..f820fe6 100644
--- a/src/couch_peruser/src/couch_peruser.erl
+++ b/src/couch_peruser/src/couch_peruser.erl
@@ -58,8 +58,8 @@
start_link() ->
gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
--spec init() -> #state{}.
-init() ->
+-spec init_state() -> #state{}.
+init_state() ->
couch_log:debug("peruser: starting on node ~p in pid ~p", [node(), self()]),
case config:get_boolean("couch_peruser", "enable", false) of
false ->
@@ -308,7 +308,7 @@ cluster_stable(Server) ->
-spec init(Options :: list()) -> {ok, #state{}}.
init([]) ->
ok = subscribe_for_changes(),
- {ok, init()}.
+ {ok, init_state()}.
handle_call(is_stable, _From, #state{cluster_stable = IsStable} = State) ->
{reply, IsStable, State};
@@ -318,16 +318,16 @@ handle_call(_Msg, _From, State) ->
handle_cast(update_config, State) when State#state.states =/= undefined ->
exit_changes(State),
- {noreply, init()};
+ {noreply, init_state()};
handle_cast(update_config, _) ->
- {noreply, init()};
+ {noreply, init_state()};
handle_cast(stop, State) ->
{stop, normal, State};
handle_cast(cluster_unstable, State) when State#state.states =/= undefined ->
exit_changes(State),
- {noreply, init()};
+ {noreply, init_state()};
handle_cast(cluster_unstable, _) ->
- {noreply, init()};
+ {noreply, init_state()};
handle_cast(cluster_stable, State) ->
{noreply, start_listening(State)};
handle_cast(_Msg, State) ->
--
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.