From dcf9e0137ae8ada6a68b93ea8f76457600460996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Mon, 20 Jan 2020 17:38:01 +0100 Subject: [PATCH] fixing actor on exit --- actor/src/udsactor/service.py | 7 ------- actor/src/udsactor/windows/service.py | 4 +--- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/actor/src/udsactor/service.py b/actor/src/udsactor/service.py index 1cc73c451..2a3890d25 100644 --- a/actor/src/udsactor/service.py +++ b/actor/src/udsactor/service.py @@ -383,13 +383,6 @@ class CommonService: # pylint: disable=too-many-instance-attributes # **************************************** # Methods that CAN BE overriden by actors # **************************************** - def idle(self) -> None: - ''' - When needs to "pump" messages for example on Windows... - ''' - return - - def doWait(self, miliseconds: int) -> None: ''' Invoked to wait a bit diff --git a/actor/src/udsactor/windows/service.py b/actor/src/udsactor/windows/service.py index 2cc90f7ff..81db4e56f 100644 --- a/actor/src/udsactor/windows/service.py +++ b/actor/src/udsactor/windows/service.py @@ -91,6 +91,7 @@ class UDSActorSvc(win32serviceutil.ServiceFramework, CommonService): def doWait(self, miliseconds: int) -> None: win32event.WaitForSingleObject(self._hWaitStop, miliseconds) + pythoncom.PumpWaitingMessages() # pylint: disable=no-member def oneStepJoin(self, name: str, domain: str, ou: str, account: str, password: str) -> None: # pylint: disable=too-many-arguments ''' @@ -204,9 +205,6 @@ class UDSActorSvc(win32serviceutil.ServiceFramework, CommonService): except Exception as e: logger.error('Exception removing user from Remote Desktop Users: {}'.format(e)) - def idle(self) -> None: - pythoncom.PumpWaitingMessages() # pylint: disable=no-member - def SvcDoRun(self) -> None: # pylint: disable=too-many-statements, too-many-branches ''' Main service loop