mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-24 21:34:41 +03:00
fixing service
This commit is contained in:
parent
5229caead5
commit
8678fa8f79
@ -71,6 +71,7 @@ class CommonService: # pylint: disable=too-many-instance-attributes
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def execute(cmdLine: str, section: str) -> bool:
|
def execute(cmdLine: str, section: str) -> bool:
|
||||||
try:
|
try:
|
||||||
|
logger.info('Executing command on {}: {}'.format(section, cmdLine))
|
||||||
res = subprocess.check_call(cmdLine, shell=True)
|
res = subprocess.check_call(cmdLine, shell=True)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error('Got exception executing: {} - {} - {}'.format(section, cmdLine, e))
|
logger.error('Got exception executing: {} - {} - {}'.format(section, cmdLine, e))
|
||||||
@ -137,7 +138,7 @@ class CommonService: # pylint: disable=too-many-instance-attributes
|
|||||||
srvInterface = self.serviceInterfaceInfo()
|
srvInterface = self.serviceInterfaceInfo()
|
||||||
if srvInterface:
|
if srvInterface:
|
||||||
# Rery while RESTConnectionError (that is, cannot connect)
|
# Rery while RESTConnectionError (that is, cannot connect)
|
||||||
counter = 8
|
counter = 60
|
||||||
logged = False
|
logged = False
|
||||||
while self._isAlive:
|
while self._isAlive:
|
||||||
counter -= 1
|
counter -= 1
|
||||||
|
@ -219,6 +219,7 @@ class UDSActorSvc(win32serviceutil.ServiceFramework, CommonService):
|
|||||||
pythoncom.CoInitialize() # pylint: disable=no-member
|
pythoncom.CoInitialize() # pylint: disable=no-member
|
||||||
|
|
||||||
if not self.initialize():
|
if not self.initialize():
|
||||||
|
logger.info('Service stopped due to init')
|
||||||
self.finish()
|
self.finish()
|
||||||
win32event.WaitForSingleObject(self._hWaitStop, 5000)
|
win32event.WaitForSingleObject(self._hWaitStop, 5000)
|
||||||
return # Stop daemon if initializes told to do so
|
return # Stop daemon if initializes told to do so
|
||||||
|
Loading…
Reference in New Issue
Block a user