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
|
# Play with function to create station list
|
||||||
stations = unique_stations(get_db_connection())
|
stations = unique_stations(get_db_connection())
|
||||||
print(stations)
|
|
||||||
|
|
||||||
|
|
||||||
return render_template('index.html',
|
return render_template('index.html',
|
||||||
station_call = config['Settings']['station_call'],
|
station_call = config['Settings']['station_call'],
|
||||||
|
|
|
@ -64,12 +64,16 @@ def main():
|
||||||
try:
|
try:
|
||||||
# Insert data
|
# Insert data
|
||||||
conn.execute(sql, list(a.values()))
|
conn.execute(sql, list(a.values()))
|
||||||
|
|
||||||
|
# TODO update stations table here
|
||||||
|
|
||||||
|
|
||||||
conn.commit()
|
conn.commit()
|
||||||
|
|
||||||
# TODO remove packets that are older ('created') than a limit set in config.ini
|
# TODO remove packets that are older ('created') than a limit set in config.ini
|
||||||
# "5 minutes" also works
|
# "5 minutes" also works
|
||||||
conn.execute("DELETE FROM frames WHERE created < DATETIME('now', '"+config['Settings']['keep_time']+"')")
|
#conn.execute("DELETE FROM frames WHERE created < DATETIME('now', '"+config['Settings']['keep_time']+"')")
|
||||||
conn.commit()
|
#conn.commit()
|
||||||
except:
|
except:
|
||||||
print("Error with SQLite!")
|
print("Error with SQLite!")
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user