Ejemplo n.º 1
0
    def stop(self):
        """
        This is called to stop the viewpoint by call ints quit method and
        then telling it to quit via kill if needs be.

        This method can potentially be called again after a call to start,
        bear this in mind.

        :return: None

        """
        rc = proc.check(self.commandProc)
        if rc:
            # Ask the viewpoint nicely to shutdown:
            self.log.info("stop: asking viewpoint to shutdown.")
            try:
                rc = self.dbc.browserQuit()
            except viewpointdirect.BrowserNotPresent:
                pass

            self.log.info(
                "stop: stopping the viewpoint PID:'%s' and all its children." %
                self.pid)
            proc.kill(self.pid)
        else:
            self.log.warn("stop: viewpoint not running to stop it.")
Ejemplo n.º 2
0
    def stop(self):
        """
        This is called to stop the process that was set up in an earlier
        call to the setup(...) method.

        This method can potentially be called again after a call to start,
        bear this in mind.

        :return: None

        """
        if self.pid:
            self.log.info("stop: stopping the process PID:'%s' and all its children." % self.pid)
            try:
                proc.kill(self.pid)
            except OSError as e:
                self.log.warn("pkill: call failure %s " % str(e))
        else:
            self.log.warn("stop: process not running to stop it.")
Ejemplo n.º 3
0
    def stop(self):
        """
        This is called to stop the viewpoint by call ints quit method and
        then telling it to quit via kill if needs be.

        This method can potentially be called again after a call to start,
        bear this in mind.

        :return: None

        """
        rc = proc.check(self.commandProc)
        if rc:
            # Ask the viewpoint nicely to shutdown:
            self.log.info("stop: asking viewpoint to shutdown.")
            try:
                rc = self.dbc.browserQuit()
            except viewpointdirect.BrowserNotPresent:
                pass

            self.log.info("stop: stopping the viewpoint PID:'%s' and all its children." % self.pid)
            proc.kill(self.pid)
        else:
            self.log.warn("stop: viewpoint not running to stop it.")