diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2023-05-18 05:12:35 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2023-05-18 05:12:35 +0300 |
commit | 2960f9f09a9991e342a676999e498b08affa4dff (patch) | |
tree | 3198fed18a400588bb38dd1e523b0e50ba07917b /src/home/database/bots.py | |
parent | c0111bf4d3dd91f54d27346970e4c6e0a1ce357e (diff) |
openwrt: home side changes
Diffstat (limited to 'src/home/database/bots.py')
-rw-r--r-- | src/home/database/bots.py | 7 |
1 files changed, 4 insertions, 3 deletions
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, |