mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-23 17:34:17 +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
|
||||
def execute(cmdLine: str, section: str) -> bool:
|
||||
try:
|
||||
logger.info('Executing command on {}: {}'.format(section, cmdLine))
|
||||
res = subprocess.check_call(cmdLine, shell=True)
|
||||
except Exception as 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()
|
||||
if srvInterface:
|
||||
# Rery while RESTConnectionError (that is, cannot connect)
|
||||
counter = 8
|
||||
counter = 60
|
||||
logged = False
|
||||
while self._isAlive:
|
||||
counter -= 1
|
||||
|
@ -219,6 +219,7 @@ class UDSActorSvc(win32serviceutil.ServiceFramework, CommonService):
|
||||
pythoncom.CoInitialize() # pylint: disable=no-member
|
||||
|
||||
if not self.initialize():
|
||||
logger.info('Service stopped due to init')
|
||||
self.finish()
|
||||
win32event.WaitForSingleObject(self._hWaitStop, 5000)
|
||||
return # Stop daemon if initializes told to do so
|
||||
|
Loading…
Reference in New Issue
Block a user