master
Jing Li 2023-09-07 21:35:22 +08:00
parent 1223d312c8
commit 04a4e9f156
1 changed files with 1 additions and 0 deletions

View File

@ -32,6 +32,7 @@ class Camera:
with conn:
with conn.cursor() as cursor:
cursor.execute("update devices set state = %s where id = %s", (status, self.id))
conn.commit()
def init_logger():
logging.basicConfig(filename='healthbeat.log', level=logging.INFO, format='[%(asctime)s] %(levelname)s - %(message)s', datefmt='%Y-%m-%d %H:%M:%S')