diff --git a/api_app.py b/api_app.py index bf55831..33a6d6e 100644 --- a/api_app.py +++ b/api_app.py @@ -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'], diff --git a/kiss_and_db.py b/kiss_and_db.py index bfb5d9b..1bfae30 100644 --- a/kiss_and_db.py +++ b/kiss_and_db.py @@ -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: