Commit 8ccc0cda authored by Gabriel Monnerat's avatar Gabriel Monnerat

revert r45210. useless code

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@45212 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e6d8a8ca
......@@ -22,22 +22,6 @@ def wait_use_port(pid, timeout_limit=30):
return False
def stopDaemonProcess(port):
"""
Temporary Function to stop the paster daemon. The goals is to stop the
server that is running forever using the port.
"""
for process in psutil.process_iter():
if process.name == "paster" and "paster serve" in " ".join(process.cmdline):
try:
connection_list = process.get_connections()
for connection in connection_list:
if connection.status == "LISTEN" and connection.local_address[1] == port:
process.send_signal(SIGQUIT)
except psutil.error.AccessDenied, e:
pass
def exit(msg):
sys.stderr.write(msg)
sys.exit(0)
......@@ -94,10 +78,6 @@ def run(handler_name):
if DAEMON:
log_file = '%s/cloudooo_test.log' % config.get('app:main',
'working_path')
hostname = config.get("server:main", "host")
port = int(config.get("server:main", "port"))
if socketStatus(hostname, port):
stopDaemonProcess(port)
if path.exists(log_file):
remove(log_file)
command = [paster_path, 'serve', '--log-file', log_file,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment