[CalendarServer-changes] [6230] CalendarServer/trunk/contrib/performance/speedcenter.tac

source_changes at macosforge.org source_changes at macosforge.org
Wed Sep 1 10:27:07 PDT 2010


Revision: 6230
          http://trac.macosforge.org/projects/calendarserver/changeset/6230
Author:   exarkun at twistedmatrix.com
Date:     2010-09-01 10:27:04 -0700 (Wed, 01 Sep 2010)
Log Message:
-----------
more reasonable (than manage.py) way to run the server

Added Paths:
-----------
    CalendarServer/trunk/contrib/performance/speedcenter.tac

Added: CalendarServer/trunk/contrib/performance/speedcenter.tac
===================================================================
--- CalendarServer/trunk/contrib/performance/speedcenter.tac	                        (rev 0)
+++ CalendarServer/trunk/contrib/performance/speedcenter.tac	2010-09-01 17:27:04 UTC (rev 6230)
@@ -0,0 +1,17 @@
+
+from twisted.python.modules import getModule
+from twisted.application.service import Application
+from twisted.application.internet import TCPServer
+from twisted.web.server import Site
+from twisted.web.wsgi import WSGIResource
+from twisted.internet import reactor
+
+speedcenter = getModule("speedcenter").filePath
+django = speedcenter.sibling("wsgi").child("django.wsgi")
+namespace = {"__file__": django.path}
+execfile(django.path, namespace, namespace)
+
+application = Application("SpeedCenter")
+resource = WSGIResource(reactor, reactor.getThreadPool(), namespace["application"])
+site = Site(resource, 'httpd.log')
+TCPServer(8000, site).setServiceParent(application)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100901/cec0f557/attachment.html>


More information about the calendarserver-changes mailing list