Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7D91F18C6D for ; Tue, 2 Jun 2015 17:44:51 +0000 (UTC) Received: (qmail 6851 invoked by uid 500); 2 Jun 2015 17:44:51 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 6799 invoked by uid 500); 2 Jun 2015 17:44:51 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 6551 invoked by uid 99); 2 Jun 2015 17:44:50 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jun 2015 17:44:50 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id AC8BFE022E; Tue, 2 Jun 2015 17:44:50 +0000 (UTC) From: kxepal To: dev@couchdb.apache.org Reply-To: dev@couchdb.apache.org References: In-Reply-To: Subject: [GitHub] couchdb-couch-replicator pull request: 2707 merge couch replicator... Content-Type: text/plain Message-Id: <20150602174450.AC8BFE022E@git1-us-west.apache.org> Date: Tue, 2 Jun 2015 17:44:50 +0000 (UTC) Github user kxepal commented on a diff in the pull request: https://github.com/apache/couchdb-couch-replicator/pull/11#discussion_r31549841 --- Diff: src/couch_replicator_manager.erl --- @@ -451,7 +487,14 @@ maybe_start_replication(State, DbName, DocId, RepDoc) -> true = ets:insert(?DOC_TO_REP, {{DbName, DocId}, RepId}), couch_log:notice("Attempting to start replication `~s` (document `~s`).", [pp_rep_id(RepId), DocId]), - Pid = spawn_link(fun() -> start_replication(Rep, 0) end), + StartDelaySecs = erlang:max(0, list_to_integer( + config:get("replicator", "start_delay", "10"))), --- End diff -- There is nicer helper [config:get_integer(Key, Value, Default)](https://github.com/apache/couchdb-config/blob/master/src/config.erl#L60-L66). --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---