[CalendarServer-changes] [14998] CalendarServer/trunk/txdav/dps/server.py

source_changes at macosforge.org source_changes at macosforge.org
Sat Jul 25 08:34:39 PDT 2015


Revision: 14998
          http://trac.calendarserver.org//changeset/14998
Author:   cdaboo at apple.com
Date:     2015-07-25 08:34:39 -0700 (Sat, 25 Jul 2015)
Log Message:
-----------
Make sure connection pool service is shut down properly when used by DPS.

Modified Paths:
--------------
    CalendarServer/trunk/txdav/dps/server.py

Modified: CalendarServer/trunk/txdav/dps/server.py
===================================================================
--- CalendarServer/trunk/txdav/dps/server.py	2015-07-24 20:45:55 UTC (rev 14997)
+++ CalendarServer/trunk/txdav/dps/server.py	2015-07-25 15:34:39 UTC (rev 14998)
@@ -808,9 +808,12 @@
         else:
             setproctitle("CalendarServer Directory Proxy Service")
 
+        multiService = MultiService()
+
         try:
-            _ignore_pool, txnFactory = getDBPool(config)
+            pool, txnFactory = getDBPool(config)
             store = storeFromConfigWithDPSServer(config, txnFactory)
+            pool.setServiceParent(multiService)
         except Exception as e:
             log.error("Failed to create directory service", error=e)
             raise
@@ -832,10 +835,9 @@
             ),
             DirectoryProxyAMPFactory(store.directoryService())
         )
+        dpsService.setServiceParent(multiService)
 
         if config.Manhole.Enabled:
-            multiService = MultiService()
-            dpsService.setServiceParent(multiService)
             try:
                 from twisted.conch.manhole_tap import (
                     makeService as manholeMakeService
@@ -864,6 +866,4 @@
                     "manhole_tap could not be imported"
                 )
 
-            return multiService
-        else:
-            return dpsService
+        return multiService
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150725/46b4ea7a/attachment.html>


More information about the calendarserver-changes mailing list