[CalendarServer-changes] [7477] CalendarServer/branches/users/glyph/new-export/calendarserver/tools/ cmdline.py

source_changes at macosforge.org source_changes at macosforge.org
Mon May 16 07:46:38 PDT 2011


Revision: 7477
          http://trac.macosforge.org/projects/calendarserver/changeset/7477
Author:   glyph at apple.com
Date:     2011-05-16 07:46:38 -0700 (Mon, 16 May 2011)
Log Message:
-----------
treat configuration as a variable rather than a global, since that's possible here, and disable memcache when it isn't running, since utility services shouldn't need it

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/new-export/calendarserver/tools/cmdline.py

Modified: CalendarServer/branches/users/glyph/new-export/calendarserver/tools/cmdline.py
===================================================================
--- CalendarServer/branches/users/glyph/new-export/calendarserver/tools/cmdline.py	2011-05-16 14:46:25 UTC (rev 7476)
+++ CalendarServer/branches/users/glyph/new-export/calendarserver/tools/cmdline.py	2011-05-16 14:46:38 UTC (rev 7477)
@@ -21,10 +21,9 @@
 import sys
 
 from calendarserver.tap.caldav import CalDAVServiceMaker, CalDAVOptions
-from calendarserver.tools.util import loadConfig
+from calendarserver.tools.util import loadConfig, autoDisableMemcached
+from twistedcaldav.config import ConfigurationError
 
-from twistedcaldav.config import ConfigurationError, config
-
 # TODO: direct unit tests for this function.
 
 def utilityMain(configFileName, serviceClass, reactor=None):
@@ -56,11 +55,13 @@
     if reactor is None:
         from twisted.internet import reactor
     try:
-        loadConfig(configFileName)
+        config = loadConfig(configFileName)
 
         config.ProcessType = "Utility"
         config.UtilityServiceClass = serviceClass
 
+        autoDisableMemcached(config)
+
         maker = CalDAVServiceMaker()
         options = CalDAVOptions
         service = maker.makeService(options)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110516/42ef1310/attachment.html>


More information about the calendarserver-changes mailing list