dé-tabification
This commit is contained in:
parent
9644d0a87c
commit
dc22d01b6e
2 changed files with 20 additions and 20 deletions
18
daemon.py
18
daemon.py
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue