def _handle_publish(self, message):
        publish_args = message.get()

        if (self._consume_channel and self._consume_channel._state == 2):
            delivery_tag = message.delivery_tag
            if delivery_tag in self._responses:
                self.acknowledge_message(delivery_tag)
                index = self._responses.index(delivery_tag)
                del self._responses[index]

        if (self._publish_channel and self._publish_channel._state == 2):
            self._publish_channel.basic_publish(**publish_args)

            self._message_number += 1
            self.logger.debug("[AMQP-PUBLISHED] #%s: <%s> %s" %
                             (self._message_number, message.correlation_id,
                              message.body))
        if message.redeliver:
            self._deliveries[self._message_number] = {}
            self._deliveries[self._message_number]["task"] = message
            self._deliveries[self._message_number]["ts"] = datetime.now()

        if publish_args['properties'].correlation_id is not None:
            self._processing = False
Create Flask app.
dataset/ETHPy150Open comodit/synapse-agent/synapse/amqp.py/AmqpSynapse._handle_publish--crossover with--dataset/ETHPy150Open Akagi201/learning-python/flask/flask-boost/test/application/__init__.py/create_app