Exemplo n.º 1
0
    def __init__(self, level=logging.NOTSET):
        logging.Handler.__init__(self, level=level)
        self.connection = None
        self.channel = None

        self.connection, self.channel, self.exchange = amqp_connect()
        self.producer = kombu.messaging.Producer(self.channel, self.exchange,
                                                 serializer='json')
Exemplo n.º 2
0
 def _initialize():
     """Initialize amqp artefacts."""
     _, channel, exchange = amqp_connect()
     return kombu.messaging.Producer(channel, exchange, serializer='json')
Exemplo n.º 3
0
 def _initialize():
     """Initialize amqp artefacts."""
     _, channel, exchange = amqp_connect()
     return kombu.messaging.Producer(channel, exchange, serializer='json')