Пример #1
0
 def on_message(self, body, message):
     exchange = message.delivery_info['exchange']
     routing_key = message.delivery_info['routing_key']
     logger.info('received job message from %s#%s', exchange, routing_key)
     store_pulse_tasks.apply_async(args=[body, exchange, routing_key],
                                   queue='store_pulse_tasks')
     message.ack()
Пример #2
0
 def on_message(self, body, message):
     exchange = message.delivery_info['exchange']
     routing_key = message.delivery_info['routing_key']
     logger.debug('received job message from %s#%s', exchange, routing_key)
     if exchange.startswith('exchange/taskcluster-queue/v1/'):
         store_pulse_tasks.apply_async(
             args=[body, exchange, routing_key, self.root_url],
             queue='store_pulse_tasks')
     else:
         store_pulse_pushes.apply_async(
             args=[body, exchange, routing_key, self.root_url],
             queue='store_pulse_pushes')
     message.ack()