dé-tabification

This commit is contained in:
Daniel STAN 2015-11-22 17:47:14 +01:00
parent 9644d0a87c
commit dc22d01b6e
2 changed files with 20 additions and 20 deletions

View file

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