

def start_amqp(self):
    ' Starts all needed threads: controller and AMQP transport IOLOOP.\n        '
    try:
        self.amqpsynapse = AmqpSynapse(config.rabbitmq, pq=self.pq, tq=self.tq)
        self.controller = Controller(self.tq, self.pq)
        self.controller.start()
        self.controller.start_scheduler()
        self.amqpsynapse.run()
    except (AMQPConnectionError, KeyboardInterrupt):
        pass
    except ResourceException as err:
        self.logger.error(str(err))
    except Exception as err:
        self.logger.error(err)
    finally:
        self.amqpsynapse.stop()
        self.stop_synapse()

dataset/ETHPy150Open comodit/synapse-agent/synapse/dispatcher.py Dispatcher.start_amqp/original