couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vatam...@apache.org
Subject [couchdb] branch 63012-scheduler updated: [fixup] a few scheduler fixups
Date Thu, 13 Apr 2017 01:33:09 GMT
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch 63012-scheduler
in repository https://gitbox.apache.org/repos/asf/couchdb.git

The following commit(s) were added to refs/heads/63012-scheduler by this push:
       new  15b6cf1   [fixup] a few scheduler fixups
15b6cf1 is described below

commit 15b6cf13c6340495ebab0c1097ec369eab5ec264
Author: Nick Vatamaniuc <vatamane@apache.org>
AuthorDate: Wed Apr 12 21:33:03 2017 -0400

    [fixup] a few scheduler fixups
    
     use ?MODULE like in other places
    
     set_history should be set_max_history
---
 src/couch_replicator/src/couch_replicator_scheduler.erl | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/couch_replicator/src/couch_replicator_scheduler.erl b/src/couch_replicator/src/couch_replicator_scheduler.erl
index c929364..3ba0403 100644
--- a/src/couch_replicator/src/couch_replicator_scheduler.erl
+++ b/src/couch_replicator/src/couch_replicator_scheduler.erl
@@ -319,7 +319,7 @@ handle_config_change("replicator", "interval", V, _, S) ->
     {ok, S};
 
 handle_config_change("replicator", "max_history", V, _, S) ->
-    ok = gen_server:cast(?MODULE, {set_history, list_to_integer(V)}),
+    ok = gen_server:cast(?MODULE, {set_max_history, list_to_integer(V)}),
     {ok, S};
 
 handle_config_change(_, _, _, _, S) ->
@@ -791,9 +791,7 @@ job_ejson(Job) ->
 
 -spec jobs() -> [[tuple()]].
 jobs() ->
-    ets:foldl(fun(Job, Acc) ->
-        [job_ejson(Job) | Acc]
-    end, [], couch_replicator_scheduler).
+    ets:foldl(fun(Job, Acc) -> [job_ejson(Job) | Acc] end, [], ?MODULE).
 
 
 -spec job(job_id()) -> {ok, {[_ | _]}} | {error, not_found}.

-- 
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <commits@couchdb.apache.org>'].

Mime
View raw message