[Zope3-checkins]
SVN: Zope3/branches/jinty-zodbless/src/zope/app/twisted/main.py
Convert to using setup_app_factory. Unfortunately I cant see
a sane way to test it.
Brian Sutherland
jinty at web.de
Mon Apr 9 17:50:32 EDT 2007
Log message for revision 74065:
Convert to using setup_app_factory. Unfortunately I cant see a sane way to test it.
Changed:
U Zope3/branches/jinty-zodbless/src/zope/app/twisted/main.py
-=-
Modified: Zope3/branches/jinty-zodbless/src/zope/app/twisted/main.py
===================================================================
--- Zope3/branches/jinty-zodbless/src/zope/app/twisted/main.py 2007-04-09 21:27:55 UTC (rev 74064)
+++ Zope3/branches/jinty-zodbless/src/zope/app/twisted/main.py 2007-04-09 21:50:32 UTC (rev 74065)
@@ -33,6 +33,7 @@
import zope.app.appsetup
import zope.app.appsetup.interfaces
import zope.app.appsetup.product
+from zope.app.appsetup import appsetup
from zope.app import wsgi
from zope.app.twisted import log
@@ -101,10 +102,9 @@
zope.app.appsetup.config(options.site_definition)
- db = zope.app.appsetup.appsetup.multi_database(options.databases)[0][0]
- notify(zope.app.appsetup.interfaces.DatabaseOpened(db))
+ app_factory = appsetup.setup_app_factory(options.databases)
- return db
+ return app_factory
def load_options(args=None):
@@ -145,18 +145,7 @@
zope.app.appsetup.config(options.site_definition, features=features)
- app_factory = zope.component.queryUtility(zope.app.appsetup.interfaces.IApplicationFactory)
- if app_factory is None:
- # We don't have an application factory registered, so we try to make
- # a ZODB one from the options (probably parsing the options should
- # just register the utility in future)
- from zope.app.zodb.app import ZODBApplicationFactory
- db = zope.app.appsetup.appsetup.multi_database(options.databases)[0][0]
- app_factory = ZODBApplicationFactory(db)
- else:
- # Error rather than do unintuitive stuff
- assert options.databases is None
- app_factory.prepare()
+ app_factory = appsetup.setup_app_factory(options.databases)
# Set number of threads
reactor.suggestThreadPoolSize(options.threads)
More information about the Zope3-Checkins
mailing list