def begin(queue): signal.signal(signal.SIGTERM, sigterm_handler) load(queue) queue.put('CONNECTED') start() signal.pause()