Commit dc22d01b authored by Daniel Stan's avatar Daniel Stan

dé-tabification

parent 9644d0a8
......@@ -54,20 +54,20 @@ class Ticket(object):
chambre = u'EXT'
try:
deb_adh = crans_utils.datetime_from_generalized_time_format(facture['debutAdhesion'][0].value)
deb_adh = deb_adh.strftime('%d/%m/%Y')
deb_adh = crans_utils.datetime_from_generalized_time_format(facture['debutAdhesion'][0].value)
deb_adh = deb_adh.strftime('%d/%m/%Y')
except:
deb_adh=False
try:
fin_adh = crans_utils.datetime_from_generalized_time_format(facture['finAdhesion'][0].value)
fin_adh = fin_adh.strftime('%d/%m/%Y')
deb_adh=False
try:
fin_adh = crans_utils.datetime_from_generalized_time_format(facture['finAdhesion'][0].value)
fin_adh = fin_adh.strftime('%d/%m/%Y')
except:
fin_adh=False
try:
fin_co = crans_utils.datetime_from_generalized_time_format(facture['finConnexion'][0].value)
fin_adh=False
try:
fin_co = crans_utils.datetime_from_generalized_time_format(facture['finConnexion'][0].value)
fin_co = fin_co.strftime('%d/%m/%Y')
except:
fin_co=False
except:
fin_co=False
todo = {
'fid' : facture['fid'][0].value,
'article' : [ art.value for art in facture['article']],
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment