[CalendarServer-changes] [5223] CalendarServer/branches/users/cdaboo/deployment-partition-4722/ twistedcaldav/client/pool.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Feb 26 18:32:31 PST 2010


Revision: 5223
          http://trac.macosforge.org/projects/calendarserver/changeset/5223
Author:   cdaboo at apple.com
Date:     2010-02-26 18:32:31 -0800 (Fri, 26 Feb 2010)
Log Message:
-----------
Turn off keep-alive for now. Improve logging.

Modified Paths:
--------------
    CalendarServer/branches/users/cdaboo/deployment-partition-4722/twistedcaldav/client/pool.py

Modified: CalendarServer/branches/users/cdaboo/deployment-partition-4722/twistedcaldav/client/pool.py
===================================================================
--- CalendarServer/branches/users/cdaboo/deployment-partition-4722/twistedcaldav/client/pool.py	2010-02-27 01:24:03 UTC (rev 5222)
+++ CalendarServer/branches/users/cdaboo/deployment-partition-4722/twistedcaldav/client/pool.py	2010-02-27 02:32:31 UTC (rev 5223)
@@ -150,11 +150,11 @@
 
         @return: A L{Deferred} that fires with the L{IProtocol} instance.
         """
+        self._pendingConnects += 1
+
         self.log_debug("Initiating new client connection to: %s" % (self._serverAddress,))
         self._logClientStats()
 
-        self._pendingConnects += 1
-
         factory = self.clientFactory(self._reactor)
         factory.connectionPool = self
 
@@ -213,7 +213,7 @@
             return result
 
         self.clientBusy(client)
-        d = client.submitRequest(request, closeAfter=False)
+        d = client.submitRequest(request, closeAfter=True)
         d.addCallbacks(_freeClientAfterRequest, _goneClientAfterError)
         return d
 
@@ -288,12 +288,14 @@
         return d
 
     def _logClientStats(self):
-        self.log_debug("Clients #free: %d, #busy: %d, "
+        self.log_debug("Clients for '%s' #free: %d, #busy: %d, "
                        "#pending: %d, #queued: %d" % (
+                self._name,
                 len(self._freeClients),
                 len(self._busyClients),
                 self._pendingConnects,
-                len(self._pendingRequests)))
+                len(self._pendingRequests)
+        ))
 
     def clientGone(self, client):
         """
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100226/eccc52f2/attachment-0001.html>


More information about the calendarserver-changes mailing list