Ejemplo n.º 1
0
 def add_one_facedetect_entry(self, timestamp, count):
     """Add one face detect datapoint at timestamp"""
     logger.info("Add new data point: {} at {}".format(count,
                                                       datetime.datetime.utcfromtimestamp(timestamp).isoformat()))
     c = self._conn.cursor()
     c.execute("INSERT INTO FacesDetect VALUES({}, {})".format(timestamp, count))
     self._conn.commit()
     new_data = (timestamp, count)
     self.face_detect_data.append(new_data)
     WebClientsCommands.sendNewFacesEntryAll(self.face_detect_data, new_data)
Ejemplo n.º 2
0
 def add_one_facedetect_entry(self, timestamp, count):
     """Add one face detect datapoint at timestamp"""
     logger.info("Add new data point: {} at {}".format(
         count,
         datetime.datetime.utcfromtimestamp(timestamp).isoformat()))
     c = self._conn.cursor()
     c.execute("INSERT INTO FacesDetect VALUES({}, {})".format(
         timestamp, count))
     self._conn.commit()
     new_data = (timestamp, count)
     self.face_detect_data.append(new_data)
     WebClientsCommands.sendNewFacesEntryAll(self.face_detect_data,
                                             new_data)