Ignore:
Timestamp:
12 Jun 2012, 10:14:36 (12 years ago)
Author:
uli
Message:

Clean up.

File:
1 edited

Legend:

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

    r8689 r8690  
    44import sys
    55import time
    6 #import waeup.kofa
    76
    8 AVAILABLE_KOFA_PROJECTS = ['waeup.kofa',]
    97packages = dict()
    10 kofa_projects = dict()
    118
    129root = os.path.dirname(os.path.dirname(os.path.dirname(
     
    2926
    3027print "WAEUP.STRESS.INIT: INSTANCES: ", instances
    31 
    32 def do_foo():
    33     mydir = os.path.dirname(os.path.dirname(__file__))
    34     print "MYDIR", mydir
    35     #import pdb; pdb.set_trace()
    3628
    3729def enable_datafs(path, proj_name):
     
    8678    path = instances[name]
    8779    print "WAEUP.STRESS: starting instance %s at %s using %s" % (
    88         name, path, mode),
     80        name, path, mode)
    8981    old_cwd_ = os.getcwd()
    9082    os.chdir(path)
     
    10698def wait_for_startup(host, port):
    10799    """Wait until a connection to host and port can be made.
     100
     101    After a timeout of 10 secs we abort raising an IOError.
    108102    """
     103    print "WAEUP.STRESS.INIT: waiting for instance(s) to come up on %s:%s" % (
     104        host, port)
    109105    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     106    start = time.time()
    110107    while True:
     108        if time.time() - 10 > start:
     109            raise IOError('timeout while waiting for instance to come up')
    111110        try:
    112111            s.connect((host, port))
     
    115114            time.sleep(0.1)
    116115    s.close()
     116    print "WAEUP.STRESS.INIT: instance(s) up after %.2f secs" % (
     117        time.time() - start,)
    117118    return
    118119
     
    156157        './bin/python-console %s' % script, shell=True)
    157158    os.chdir(old_cwd_)
    158 
    159 def configure():
    160     import ConfigParser
    161     from multimechanize.utilities.run import project_name, cmd_opts, args
    162     print "Configure"
    163     print "PROJECT NAME: ", project_name
Note: See TracChangeset for help on using the changeset viewer.