paramétrise la QUEUE côté serveur

This commit is contained in:
Daniel STAN 2015-02-23 20:41:28 +01:00
parent b0f3090cfe
commit e0a0fb60c8
2 changed files with 4 additions and 2 deletions

View file

@ -12,12 +12,12 @@ import config
def run():
conn = pika.BlockingConnection(config.PARAMS)
ch = conn.channel()
ch.queue_declare(queue='CransTicketDebug')
ch.queue_declare(queue=config.QUEUE)
def callback(ch, method, properties, body):
print (" [x] Received %r" % (body,))
dump.print_liste(json.loads(body))
ch.basic_consume(callback, queue='CransTicketDebug', no_ack=True)
ch.basic_consume(callback, queue=config.QUEUE, no_ack=True)
ch.start_consuming()
conn.close()
# fork en arrière plan + pidfile