예제 #1
0
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()
예제 #2
0
 def stop(self):
     # Stop workers
     self.running_state = False
     self.listener.stop()
     self.listener = None
     Speaker.stop()