示例#1
0
def sends():
    while datas.not_empty:
        if temp.not_empty:
            json = datas.get()
            icon = temp.get()
            if json["user_id"] in attended["user_id"]:
                continue
            attended.update({"user_id": json["user_id"]})
            # while not sent["sent"]:
            send.post_attendance(json, icon)
示例#2
0
 def background(self):
     while self.datas.not_empty:
         data = self.datas.get()
         face = data["face"]
         uid = data["label"]
         if uid in self.absence.keys():
             continue
         cv2.imwrite("icon.png", face)
         self.absence.update({uid: uid, "sent": False})
         while not self.absence["sent"]:
             send.post_attendance(
                 {
                     "user_id": uid,
                     "camera_id": "5d4c276616171e2938004c72"
                 }, {"photo": open("icon.png", "rb")})
示例#3
0
def sends():
    while datas.not_empty:
        if temp.not_empty:
            send.post_attendance(datas.get(), temp.get())