Changeset 8655 for main/waeup.stress/trunk/src/waeup/stress/__init__.py
- Timestamp:
- 8 Jun 2012, 15:20:27 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.stress/trunk/src/waeup/stress/__init__.py
r8654 r8655 1 1 import os 2 import socket 2 3 import subprocess 3 4 import sys 5 import time 4 6 import waeup.kofa 5 7 … … 77 79 return 78 80 81 def wait_for_startup(host, port): 82 """Wait until a connection to host and port can be made. 83 """ 84 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 85 while True: 86 try: 87 s.connect((host, port)) 88 break 89 except: 90 time.sleep(0.1) 91 s.close() 92 return 93 79 94 def stop_instance(name): 80 95 path = kofa_projects[name]
Note: See TracChangeset for help on using the changeset viewer.