try new method to update_trips

This commit is contained in:
Florian Bezannier
2020-12-23 16:50:43 +01:00
parent 048477e692
commit 13e6d4ec3d
2 changed files with 9 additions and 5 deletions
+2 -5
View File
@@ -13,7 +13,7 @@ from MyPSACC import MyPSACC
from web import figures
from web.app import app, dash_app, myp, chc, save_config
from web.db import get_db
import web.db
@dash_app.callback(Output('trips_map', 'figure'),
@@ -158,7 +158,4 @@ dash_app.layout = dbc.Container(fluid=True, children=[
data_div
])
conn = get_db()
conn.create_function("update_trips", 0, update_trips)
conn.execute("CREATE TEMP TRIGGER IF NOT EXISTS update_trigger AFTER INSERT ON position BEGIN SELECT update_trips(); END;")
conn.commit()
web.db.update_callback = update_trips