Changeset 8748 for main/waeup.stress/trunk/src/waeup/stress
- Timestamp:
- 18 Jun 2012, 10:12:48 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.stress/trunk/src/waeup/stress/__init__.py
r8690 r8748 73 73 directory. 74 74 75 `mode` can be one of `paster`|`kofactl` and tells how to start the76 instance.75 `mode` can be one of `paster`|`kofactl`|`zeo`|`profile` and tells 76 how to start the instance. 77 77 """ 78 78 path = instances[name] … … 84 84 if mode == 'kofactl': 85 85 subprocess.call('./bin/kofactl start', shell=True) 86 elif mode == 'profile': 87 subprocess.call( 88 './bin/paster serve --daemon parts/etc/profile.ini', shell=True) 86 89 elif mode == 'zeo': 87 90 os.listdir('./bin') … … 150 153 """Execute waeup.stress.script in instance context. 151 154 """ 155 return exec_in_instance(name, 'install_app') 152 156 path = instances[name] 153 157 old_cwd_ = os.getcwd() … … 157 161 './bin/python-console %s' % script, shell=True) 158 162 os.chdir(old_cwd_) 163 164 def import_csv(name, *paths): 165 return exec_in_instance(name, 'import_csv', *paths) 166 167 def exec_in_instance(name, cmd, *args): 168 path = instances[name] 169 old_cwd_ = os.getcwd() 170 os.chdir(path) 171 script = os.path.join(os.path.dirname(__file__), 'scripts.py') 172 if args: 173 args = ' '.join(args) 174 else: 175 args = '' 176 subprocess.call( 177 './bin/python-console %s %s %s' % ( 178 script, cmd, args), shell=True) 179 os.chdir(old_cwd_)
Note: See TracChangeset for help on using the changeset viewer.