Don't autodelete yet.
This commit is contained in:
parent
e05a3790d6
commit
8f3b2ae707
|
@ -110,8 +110,6 @@ def index():
|
|||
|
||||
# Play with function to create station list
|
||||
stations = unique_stations(get_db_connection())
|
||||
print(stations)
|
||||
|
||||
|
||||
return render_template('index.html',
|
||||
station_call = config['Settings']['station_call'],
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user