Ignore:
Timestamp:
13 Jan 2013, 02:15:28 (12 years ago)
Author:
uli
Message:

Respect async ZODB when setting up a new instance. Basic stress tests
now work again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.stress/trunk/src/waeup/stress/scripts.py

    r8750 r9876  
    66from zope.app.appsetup import database, config
    77from zope.app.publication.zopepublication import ZopePublication
     8from zope.app.wsgi import config as wsgi_config
    89from waeup.kofa.app import University
    910
     
    4344    to this DB and the root folder.
    4445    """
     46    zope_conf = os.path.join(
     47        instance_path, 'parts', 'etc', 'zope.conf')
     48    config_file = os.path.join(
     49        instance_path, 'parts', 'etc', 'site.zcml')
    4550    print "WAEUP.STRESS: opening ZODB"
    4651    zodb_file = os.path.join(
    4752        instance_path, 'var', 'filestorage', 'Data.fs')
    48     db = database(zodb_file)
     53
     54    print "WAEUP.STRESS: configuring ZODB from %s" % (
     55        zope_conf)
     56
     57    db = wsgi_config(zope_conf)
     58
     59    # The way to configure a ZODB if only a single ZODB has to be set up.
     60    #context = config(config_file)
     61    #db = database(zodb_file)
     62
    4963    conn = db.open()
    5064    root = conn.root()
Note: See TracChangeset for help on using the changeset viewer.