couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [39/44] couch-replicator commit: updated refs/heads/63012-defensive to 1afa5ea
Date Tue, 07 Jun 2016 11:05:43 GMT
clean up completed jobs


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/aa4e80de
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/aa4e80de
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/aa4e80de

Branch: refs/heads/63012-defensive
Commit: aa4e80dea84bfffdbdf9e0a447d1a3d94bf0cf25
Parents: ed40d85
Author: Robert Newson <rnewson@apache.org>
Authored: Mon Jun 6 13:41:34 2016 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Mon Jun 6 14:07:32 2016 +0100

----------------------------------------------------------------------
 src/couch_replicator_scheduler.erl | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/aa4e80de/src/couch_replicator_scheduler.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_scheduler.erl b/src/couch_replicator_scheduler.erl
index 3c4bf50..5b837e5 100644
--- a/src/couch_replicator_scheduler.erl
+++ b/src/couch_replicator_scheduler.erl
@@ -125,6 +125,15 @@ handle_info(reschedule, State) ->
     {ok, Timer} = timer:send_after(State#state.interval, reschedule),
     {noreply, State#state{timer = Timer}};
 
+handle_info({'DOWN', _Ref, process, Pid, normal}, State) ->
+    case job_by_pid(Pid) of
+        {ok, #job{}=Job} ->
+            remove_job_int(Job);
+        _Else ->
+            ok
+    end,
+    {noreply, State};
+
 handle_info({'DOWN', _Ref, process, Pid, Reason}, State) ->
     case job_by_pid(Pid) of
         {ok, #job{}=Job0} ->


Mime
View raw message