def init_app(self, app):
        pika_params = app.config['FLASK_PIKA_PARAMS']
        pool_params = app.config['FLASK_PIKA_POOL_PARAMS']

        self.debug = app.debug
        self.logger = app.logger
        self.pool_size = 1
        self.pool_recycle = -1
        self.pool_queue = Queue()
        self.channel_recycle_times = {}

        # fix create credentials if needed
        if 'credentials' not in pika_params:
            pika_params['credentials'] = pika.PlainCredentials(pika_params['username'], pika_params['password'])
            del pika_params['username']
            del pika_params['password']

        self._pika_connection_params = pika.ConnectionParameters(**pika_params)
        self.__DEBUG("Connection params are %s" % self._pika_connection_params)

        # setup pooling if requested
        if pool_params is not None:
            self.pool_size = pool_params['pool_size']
            self.pool_recycle = pool_params['pool_recycle']
            for i in xrange(self.pool_size):
                channel = PrePopulationChannel()
                self.__set_recycle_for_channel(channel, -1)
                self.pool_queue.put(channel)
            self.__DEBUG("Pool params are %s" % pool_params)
Initialize the Flask Pika extension
dataset/ETHPy150Open WeatherDecisionTechnologies/flask-pika/flask_pika.py/Pika.init_app