Exemplo n.º 1
0
class WindowsProcessClient(ProcessClient):
    def __init__(self, *args, **kwargs):
        ProcessClient.__init__(self, *args, **kwargs)

        from zoom.agent.entities.wsservice import WinSvcStates, WService
        self._states = WinSvcStates
        self._wsc = WService(self.script_name)

    def _service_start(self):
        self._log.info('Starting service {0}'.format(self.script_name))
        return self._wsc.start_wait()

    def _service_status(self):
        return self._wsc.status_bool()

    def _service_stop(self):
        self._log.info('Stopping service {0}'.format(self.script_name))
        return self._wsc.stop_wait(wait_for_status=self._states.STOPPED,
                                   timeout=10,
                                   force=True)
Exemplo n.º 2
0
class WindowsProcessClient(ProcessClient):
    def __init__(self, *args, **kwargs):
        ProcessClient.__init__(self, *args, **kwargs)

        from zoom.agent.entities.wsservice import WinSvcStates, WService
        self._states = WinSvcStates
        self._wsc = WService(self.script_name)

    def _service_start(self):
        self._log.info('Starting service {0}'.format(self.script_name))
        return self._wsc.start_wait()

    def _service_status(self):
        return self._wsc.status_bool()

    def _service_stop(self):
        self._log.info('Stopping service {0}'.format(self.script_name))
        return self._wsc.stop_wait(wait_for_status=self._states.STOPPED,
                                   timeout=10,
                                   force=True)
Exemplo n.º 3
0
    def __init__(self, *args, **kwargs):
        ProcessClient.__init__(self, *args, **kwargs)

        from zoom.agent.entities.wsservice import WinSvcStates, WService
        self._states = WinSvcStates
        self._wsc = WService(self.script_name)
Exemplo n.º 4
0
    def __init__(self, *args, **kwargs):
        ProcessClient.__init__(self, *args, **kwargs)

        from zoom.agent.entities.wsservice import WinSvcStates, WService
        self._states = WinSvcStates
        self._wsc = WService(self.script_name)