dé-tabification
This commit is contained in:
parent
9644d0a87c
commit
dc22d01b6e
2 changed files with 20 additions and 20 deletions
22
client.py
22
client.py
|
@ -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']],
|
||||
|
|
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