예제 #1
0
 def get(self):
     data = {}
     self.set_header("Content-Type", "application/json")
     data['code'] = 200
     data['status'] = 'OK'
     con = get_connection()
     data['last'] = get_last(con, "remplir")
     self.write(data)
예제 #2
0
 def get(self):
     data = {}
     self.set_header("Content-Type", "application/json")
     data['code'] = 200
     data['status'] = "ok"
     con = get_connection()
     data['last'] = get_last(con, thing="exterior", limit=1)
     con.close()
     self.write(data)
예제 #3
0
 def get(self):
     data = {}
     self.set_header("Content-Type", "application/json")
     data['code'] = 200
     data['status'] = 'OK'
     con = get_connection()
     data['last'] = get_last(con, "tomates")  # todo get last time from DB
     con.close()
     self.write(data)
예제 #4
0
 def get(self):
     cc = get_connection()
     try:
         lastmail = get_last(cc, thing="mail")
     except (AttributeError, NameError) as bob:
         lastmail = 0
         logger.error(bob)
     self.write({
         'lastmail': lastmail,
         'etat': '%d%%' % get_cuve(cc, "cuve")
     })
     cc.close()