couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woh...@apache.org
Subject [couchdb] 24/25: whitespace and more state fixes
Date Tue, 10 Oct 2017 21:24:31 GMT
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch 749-fix-couch_peruser-app-structure
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 570d6eeb0beaac3d5e86b1c70b97fa128eb1dc06
Author: Jan Lehnardt <jan@apache.org>
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
"commits@couchdb.apache.org" <commits@couchdb.apache.org>.

Mime
View raw message