[CalendarServer-changes] [6531] CalendarServer/branches/users/glyph/sharedpool/calendarserver/tap/ caldav.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Nov 1 14:25:28 PDT 2010
Revision: 6531
http://trac.macosforge.org/projects/calendarserver/changeset/6531
Author: glyph at apple.com
Date: 2010-11-01 14:25:25 -0700 (Mon, 01 Nov 2010)
Log Message:
-----------
Introduce ConnectionPool into the service hierarchy so it can release its threads cleanly.
Modified Paths:
--------------
CalendarServer/branches/users/glyph/sharedpool/calendarserver/tap/caldav.py
Modified: CalendarServer/branches/users/glyph/sharedpool/calendarserver/tap/caldav.py
===================================================================
--- CalendarServer/branches/users/glyph/sharedpool/calendarserver/tap/caldav.py 2010-11-01 21:25:02 UTC (rev 6530)
+++ CalendarServer/branches/users/glyph/sharedpool/calendarserver/tap/caldav.py 2010-11-01 21:25:25 UTC (rev 6531)
@@ -819,7 +819,9 @@
if isinstance(ssvc, PostgresService):
# TODO: better way of doing this conditional. Look at the config
# again, possibly?
- dispenser = ConnectionDispenser(ssvc.produceConnection)
+ pool = ConnectionPool(ssvc.produceConnection)
+ pool.setServiceParent(s)
+ dispenser = ConnectionDispenser(pool)
else:
dispenser = None
@@ -1047,8 +1049,8 @@
class ConnectionDispenser(object):
- def __init__(self, connectionFactory):
- self.pool = ConnectionPool(connectionFactory)
+ def __init__(self, connectionPool):
+ self.pool = connectionPool
def dispense(self):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20101101/4057eb91/attachment-0001.html>
More information about the calendarserver-changes
mailing list