summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Newson <robert.newson@cloudant.com>2012-06-19 15:59:16 +0100
committerRobert Newson <robert.newson@cloudant.com>2012-06-19 15:59:16 +0100
commit3d53b19d5eb00957d4fe7ac02de71355c8438e29 (patch)
treecdac157e0537e765da0d916a493ea9a6b5d77dc1
parent95732bf56606847c6a2a1d1d38703a6e8b688429 (diff)
Don't perform callbacks to couch_replicator
-rw-r--r--apps/couch/src/couch_rep.erl11
1 files changed, 3 insertions, 8 deletions
diff --git a/apps/couch/src/couch_rep.erl b/apps/couch/src/couch_rep.erl
index 74ed95d0..2bdb66d1 100644
--- a/apps/couch/src/couch_rep.erl
+++ b/apps/couch/src/couch_rep.erl
@@ -176,8 +176,6 @@ do_init([{BaseId, _Ext} = RepId, {PostProps}, UserCtx] = InitArgs) ->
couch_task_status:add_task("Replication", io_lib:format("~s: ~s -> ~s",
[ShortId, dbname(Source), dbname(Target)]), "Starting"),
- couch_replicator_manager:replication_started(RepId),
-
State = #state{
changes_feed = ChangesFeed,
missing_revs = MissingRevs,
@@ -272,13 +270,11 @@ handle_info({'EXIT', _Pid, Reason}, State) ->
{stop, Reason, State}.
terminate(normal, #state{checkpoint_scheduled=nil, init_args=[RepId | _]} = State) ->
- do_terminate(State),
- couch_replicator_manager:replication_completed(RepId);
+ do_terminate(State);
terminate(normal, #state{init_args=[RepId | _]} = State) ->
timer:cancel(State#state.checkpoint_scheduled),
- do_terminate(do_checkpoint(State)),
- couch_replicator_manager:replication_completed(RepId);
+ do_terminate(do_checkpoint(State));
terminate(shutdown, #state{listeners = Listeners} = State) ->
% continuous replication stopped
@@ -287,8 +283,7 @@ terminate(shutdown, #state{listeners = Listeners} = State) ->
terminate(Reason, #state{listeners = Listeners, init_args=[RepId | _]} = State) ->
[gen_server:reply(L, {error, Reason}) || L <- Listeners],
- terminate_cleanup(State),
- couch_replicator_manager:replication_error(RepId, Reason).
+ terminate_cleanup(State).
code_change(_OldVsn, State, _Extra) ->
{ok, State}.