[CalendarServer-changes] [8390] CalendarServer/branches/users/glyph/parallel-upgrade/calendarserver/ tap/caldav.py
source_changes at macosforge.org
source_changes at macosforge.org
Sat Dec 3 00:38:54 PST 2011
Revision: 8390
http://trac.macosforge.org/projects/calendarserver/changeset/8390
Author: glyph at apple.com
Date: 2011-12-03 00:38:54 -0800 (Sat, 03 Dec 2011)
Log Message:
-----------
minor cleanups for child configuration
Modified Paths:
--------------
CalendarServer/branches/users/glyph/parallel-upgrade/calendarserver/tap/caldav.py
Modified: CalendarServer/branches/users/glyph/parallel-upgrade/calendarserver/tap/caldav.py
===================================================================
--- CalendarServer/branches/users/glyph/parallel-upgrade/calendarserver/tap/caldav.py 2011-12-03 08:38:45 UTC (rev 8389)
+++ CalendarServer/branches/users/glyph/parallel-upgrade/calendarserver/tap/caldav.py 2011-12-03 08:38:54 UTC (rev 8390)
@@ -1357,7 +1357,7 @@
arguments = [
# The name of the class to delegate to once configuration is complete.
("delegateTo", String()),
- ("pidfile", String()),
+ ("pidFile", String()),
("logID", String()),
("configFile", String()),
@@ -1381,7 +1381,7 @@
"""
@ConfigureChild.responder
- def conf(self, delegateTo, pidfile, logID, configFile, processCount,
+ def conf(self, delegateTo, pidFile, logID, configFile, processCount,
connectionPoolFD=None):
"""
Load the current config file into this child process, create a store
@@ -1392,15 +1392,18 @@
# Adjust the child's configuration to add all the relevant options for
# the store that won't be mentioned in the config file.
- config.updateDefaults(dict(
+ changedConfig = dict(
LogID = logID,
- PIDFile = pidfile,
- DBAMPFD = connectionPoolFD,
+ PIDFile = pidFile,
MultiProcess = dict(
ProcessCount = processCount
)
- ))
+ )
+ if connectionPoolFD is not None:
+ changedConfig.update(DBAMPFD=connectionPoolFD)
+ config.updateDefaults(changedConfig)
+ # Construct and start database pool and store.
pool, txnf = getDBPool(config)
if pool is not None:
pool.startService()
@@ -1408,10 +1411,10 @@
"before", "shutdown", pool.stopService
)
dbstore = storeFromConfig(config, txnf)
+
+ # Finally, construct the class we're supposed to delegate to.
delegateClass = namedAny(delegateTo)
swapAMP(self, delegateClass(dbstore))
- if connectionPoolFD is not None:
- pass
return {}
@@ -1456,8 +1459,7 @@
yield controller.callRemote(
ConfigureChild,
delegateTo=qual(there),
- pidfile="%s-migrator-%s" % (self.maker.tapname,
- thisID),
+ pidfile="%s-migrator-%s" % (self.maker.tapname, thisID),
logID="migrator-%s" % (thisID,),
configFile=self.options['config'],
processCount=config.MultiProcess.processCount,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20111203/f4c048fb/attachment.html>
More information about the calendarserver-changes
mailing list