couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [40/44] couch-replicator commit: updated refs/heads/63012-defensive to 1afa5ea
Date Tue, 07 Jun 2016 11:05:44 GMT
allow max_jobs == 0


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/commit/07ec670d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/07ec670d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/07ec670d

Branch: refs/heads/63012-defensive
Commit: 07ec670d764469766af5499ffbc30be3b6730c82
Parents: ed40d85
Author: Robert Newson <rnewson@apache.org>
Authored: Mon Jun 6 13:43:58 2016 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Mon Jun 6 14:09:24 2016 +0100

----------------------------------------------------------------------
 src/couch_replicator_scheduler.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/07ec670d/src/couch_replicator_scheduler.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_scheduler.erl b/src/couch_replicator_scheduler.erl
index 3c4bf50..9ff0e74 100644
--- a/src/couch_replicator_scheduler.erl
+++ b/src/couch_replicator_scheduler.erl
@@ -103,7 +103,7 @@ handle_call(_, _From, State) ->
     {noreply, State}.
 
 
-handle_cast({set_max_jobs, MaxJobs}, State) when is_integer(MaxJobs), MaxJobs > 0 ->
+handle_cast({set_max_jobs, MaxJobs}, State) when is_integer(MaxJobs), MaxJobs >= 0 ->
     couch_log:notice("~p: max_jobs set to ~B", [?MODULE, MaxJobs]),
     {noreply, State#state{max_jobs = MaxJobs}};
 
@@ -301,7 +301,7 @@ job_by_id(Id) ->
 
 -spec reschedule(MaxJobs :: non_neg_integer(), MaxChurn :: non_neg_integer()) -> ok.
 reschedule(MaxJobs, MaxChurn)
-  when is_integer(MaxJobs), MaxJobs > 0, is_integer(MaxChurn), MaxChurn > 0 ->
+  when is_integer(MaxJobs), MaxJobs >= 0, is_integer(MaxChurn), MaxChurn > 0 ->
     Running = running_job_count(),
     Pending = pending_job_count(),
     stop_excess_jobs(MaxJobs, Running),


Mime
View raw message