def send_stop_signal(self): if not self.stopped: b = BeanstalkdLauncherService() for i in self.pList: b.send_stop_for_pid(i.pid) cl("sending stop cmd to: ", i.pid) self.stopped = True
def send_stop_signal(self): if not self.stopped: try: b = BeanstalkdLauncherService() for i in self.console_output_collector.pList: b.addItem({"cmd":"stop", "pid": i.pid}) cl("sending stop cmd to: ", i.pid) except beanstalkc.SocketError: pass self.timer_id = gobject.timeout_add(5000, self.close_app)#Here time value are milliseconds self.stopped = True