def sigint_handler(signum, frame): global LisaFactory # Unregister handler, next Ctrl-C will kill app signal.signal(signal.SIGINT, signal.SIG_DFL) # Stop factory LisaFactory.stopTrying() # Stop reactor reactor.stop() # Stop speaker Speaker.stop()
def stop(self): # Stop workers self.running_state = False self.listener.stop() self.listener = None Speaker.stop()