Commit ad5feea0 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

slaprunner: use pidfiles to get information on running process

parent 7dfc2e0b
...@@ -268,7 +268,10 @@ def isSoftwareRunning(config=None): ...@@ -268,7 +268,10 @@ def isSoftwareRunning(config=None):
""" """
Return True if slapos is still running and false if slapos if not Return True if slapos is still running and false if slapos if not
""" """
# XXX-Marco what is 'config' for? # XXX-Cedric Hardcoded pidfile
if config:
slapgrid_pid = os.path.join(config['run_dir'], 'slapgrid-sr.pid')
return isPidFileProcessRunning(slapgrid_pid)
return isRunning('slapgrid-sr') return isRunning('slapgrid-sr')
...@@ -370,7 +373,10 @@ def isInstanceRunning(config=None): ...@@ -370,7 +373,10 @@ def isInstanceRunning(config=None):
""" """
Return True if slapos is still running and False otherwise Return True if slapos is still running and False otherwise
""" """
# XXX-Marco what is 'config' for? # XXX-Cedric Hardcoded pidfile
if config:
slapgrid_pid = os.path.join(config['run_dir'], 'slapgrid-cp.pid')
return isPidFileProcessRunning(slapgrid_pid)
return isRunning('slapgrid-cp') return isRunning('slapgrid-cp')
......
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