From 2960f9f09a9991e342a676999e498b08affa4dff Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Thu, 18 May 2023 05:12:35 +0300 Subject: openwrt: home side changes --- src/home/database/bots.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/home/database/bots.py') diff --git a/src/home/database/bots.py b/src/home/database/bots.py index 99befc0..26fb170 100644 --- a/src/home/database/bots.py +++ b/src/home/database/bots.py @@ -37,13 +37,14 @@ class BotsDatabase(MySQLDatabase): self.commit() def add_openwrt_logs(self, - lines: List[Tuple[datetime, str]]): + lines: List[Tuple[datetime, str]], + access_point: int): now = datetime.now() with self.cursor() as cursor: for line in lines: time, text = line - cursor.execute("INSERT INTO openwrt (log_time, received_time, text) VALUES (%s, %s, %s)", - (time.strftime(datetime_fmt), now.strftime(datetime_fmt), text)) + cursor.execute("INSERT INTO openwrt (log_time, received_time, text, ap) VALUES (%s, %s, %s, %s)", + (time.strftime(datetime_fmt), now.strftime(datetime_fmt), text, access_point)) self.commit() def add_sound_hits(self, -- cgit v1.2.3