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 87b0df9b642c4b1869f5b5385990f4050deb76fe Author: Jan Lehnardt <[email protected]> AuthorDate: Tue Oct 10 20:57:01 2017 +0200 whitespace and more state fixes --- src/couch_peruser/src/couch_peruser.erl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/couch_peruser/src/couch_peruser.erl b/src/couch_peruser/src/couch_peruser.erl index 8394db5..a394659 100644 --- a/src/couch_peruser/src/couch_peruser.erl +++ b/src/couch_peruser/src/couch_peruser.erl @@ -74,8 +74,8 @@ init_state() -> % set up cluster-stable listener Period = abs(config:get_integer("couch_peruser", "cluster_quiet_period", ?DEFAULT_QUIET_PERIOD)), - StartPeriod = abs(config:get_integer("couch_peruser", "cluster_start_period", - ?DEFAULT_START_PERIOD)), + StartPeriod = abs(config:get_integer("couch_peruser", + "cluster_start_period", ?DEFAULT_START_PERIOD)), {ok, Mem3Cluster} = mem3_cluster:start_link(?MODULE, self(), StartPeriod, Period), @@ -91,7 +91,8 @@ init_state() -> -spec start_listening(State :: #state{}) -> #state{} | ok. -start_listening(#state{states=ChangesStates}=State) when length(ChangesStates) > 0 -> +start_listening(#state{states=ChangesStates}=State) + when length(ChangesStates) > 0 -> % couch_log:debug("peruser: start_listening() already run on node ~p in pid ~p", [node(), self()]), State; start_listening(#state{db_name=DbName, delete_dbs=DeleteDbs} = State) -> @@ -281,8 +282,8 @@ user_db_name(User) -> [string:to_lower(integer_to_list(X, 16)) || <<X>> <= User]), <<?USERDB_PREFIX,HexUser/binary>>. --spec exit_changes(ChangesState :: #changes_state{}) -> ok. -exit_changes(ChangesState) -> +-spec exit_changes(State :: #state{}) -> ok. +exit_changes(State) -> lists:foreach(fun (ChangesState) -> demonitor(ChangesState#changes_state.changes_ref, [flush]), unlink(ChangesState#changes_state.changes_pid), -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
