Commit 72cef16b by Szeberényi Imre

watchdog fix

parent 6af82bb2
...@@ -31,9 +31,10 @@ def watch(): ...@@ -31,9 +31,10 @@ def watch():
def start_service(): def start_service():
win32serviceutil.StartService(service_name) win32serviceutil.StartService(service_name)
timo_base = 10 timo_base = 20
timo = timo_base timo = timo_base
while True: while True:
sleep(timo) # boot process may already started it, so we waiting frist
if not check_service(service_name): if not check_service(service_name):
logger.info("Service %s is not running.", service_name) logger.info("Service %s is not running.", service_name)
try: try:
...@@ -45,7 +46,6 @@ def watch(): ...@@ -45,7 +46,6 @@ def watch():
logger.exception("Cant start service %s new timo: %s" % (service_name, timo)) logger.exception("Cant start service %s new timo: %s" % (service_name, timo))
if stopped: if stopped:
return return
sleep(timo)
class AppServerSvc (win32serviceutil.ServiceFramework): class AppServerSvc (win32serviceutil.ServiceFramework):
......
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 sign in to comment