couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject svn commit: r802887 - in /couchdb/trunk/src/couchdb: couch_db.hrl couch_rep_httpc.erl
Date Mon, 10 Aug 2009 18:37:28 GMT
Author: kocolosk
Date: Mon Aug 10 18:37:28 2009
New Revision: 802887

URL: http://svn.apache.org/viewvc?rev=802887&view=rev
Log:
switch pause to milliseconds

Modified:
    couchdb/trunk/src/couchdb/couch_db.hrl
    couchdb/trunk/src/couchdb/couch_rep_httpc.erl

Modified: couchdb/trunk/src/couchdb/couch_db.hrl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_db.hrl?rev=802887&r1=802886&r2=802887&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_db.hrl (original)
+++ couchdb/trunk/src/couchdb/couch_db.hrl Mon Aug 10 18:37:28 2009
@@ -245,7 +245,7 @@
         {inactivity_timeout, 30000}
     ],
     retries = 10,
-    pause = 1,
+    pause = 500,
     conn = nil
 }).
 

Modified: couchdb/trunk/src/couchdb/couch_rep_httpc.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_rep_httpc.erl?rev=802887&r1=802886&r2=802887&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_rep_httpc.erl (original)
+++ couchdb/trunk/src/couchdb/couch_rep_httpc.erl Mon Aug 10 18:37:28 2009
@@ -95,9 +95,9 @@
         #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 @@
         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) ->



Mime
View raw message