示例#1
0
文件: logs.py 项目: dsg101/openquake
    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')
示例#2
0
文件: logs.py 项目: angri/openquake
 def _initialize():
     """Initialize amqp artefacts."""
     _, channel, exchange = amqp_connect()
     return kombu.messaging.Producer(channel, exchange, serializer='json')
示例#3
0
文件: logs.py 项目: pslh/oq-engine
 def _initialize():
     """Initialize amqp artefacts."""
     _, channel, exchange = amqp_connect()
     return kombu.messaging.Producer(channel, exchange, serializer='json')