Don't autodelete yet.

This commit is contained in:
2023-06-27 21:44:12 -05:00
parent e05a3790d6
commit 8f3b2ae707
2 changed files with 6 additions and 4 deletions

View File

@@ -64,12 +64,16 @@ def main():
try:
# Insert data
conn.execute(sql, list(a.values()))
# TODO update stations table here
conn.commit()
# TODO remove packets that are older ('created') than a limit set in config.ini
# "5 minutes" also works
conn.execute("DELETE FROM frames WHERE created < DATETIME('now', '"+config['Settings']['keep_time']+"')")
conn.commit()
#conn.execute("DELETE FROM frames WHERE created < DATETIME('now', '"+config['Settings']['keep_time']+"')")
#conn.commit()
except:
print("Error with SQLite!")
except: