summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2009-08-10 18:37:28 +0000
committerAdam Kocoloski <kocolosk@apache.org>2009-08-10 18:37:28 +0000
commitabcc5a35fda60c7124af7899939f09e59ae7968b (patch)
tree2daa1f381376869a3590c2b28d5c4b2ce12f6854 /src
parent8c532c11c33fed30c2366b945011683c097c8293 (diff)
switch pause to milliseconds
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@802887 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_db.hrl2
-rw-r--r--src/couchdb/couch_rep_httpc.erl8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/couchdb/couch_db.hrl b/src/couchdb/couch_db.hrl
index 53b2eaf9..a487300f 100644
--- a/src/couchdb/couch_db.hrl
+++ b/src/couchdb/couch_db.hrl
@@ -245,7 +245,7 @@
{inactivity_timeout, 30000}
],
retries = 10,
- pause = 1,
+ pause = 500,
conn = nil
}).
diff --git a/src/couchdb/couch_rep_httpc.erl b/src/couchdb/couch_rep_httpc.erl
index aa2b2714..8cc3cae6 100644
--- a/src/couchdb/couch_rep_httpc.erl
+++ b/src/couchdb/couch_rep_httpc.erl
@@ -95,9 +95,9 @@ process_response({ok, Status, Headers, Body}, Req) ->
#http_db{pause = Pause, retries = Retries} = Req,
?LOG_INFO("retrying couch_rep_httpc request in ~p seconds " ++
% "due to remote server error: ~s~s", [Pause/1000, Req#http_db.url,
- "due to remote server error: ~p Body ~s", [Pause, Code,
+ "due to remote server error: ~p Body ~s", [Pause/1000, Code,
Body]),
- timer:sleep(1000*Pause),
+ timer:sleep(Pause),
do_request(Req#http_db{retries = Retries-1, pause = 2*Pause})
end;
@@ -124,9 +124,9 @@ process_response({error, Reason}, Req) ->
Else
end,
?LOG_DEBUG("retrying couch_rep_httpc ~p request in ~p seconds due to " ++
- "{error, ~p}", [Method, Pause, ShortReason]),
+ "{error, ~p}", [Method, Pause/1000, ShortReason]),
% "{error}", [Method, Pause]),
- timer:sleep(1000*Pause),
+ timer:sleep(Pause),
do_request(Req#http_db{retries = Retries-1, pause = 2*Pause}).
spawn_worker_process(Req) ->