blueprint function
This commit is contained in:
@@ -4,6 +4,7 @@ import json
|
||||
from datetime import datetime, timedelta
|
||||
import os
|
||||
from flask import make_response
|
||||
from blueprint_engine import evaluate_blueprints
|
||||
|
||||
api = Blueprint('api', __name__)
|
||||
|
||||
@@ -94,6 +95,13 @@ def receive_state():
|
||||
datetime.utcnow().isoformat()
|
||||
))
|
||||
conn.commit()
|
||||
|
||||
try:
|
||||
evaluate_blueprints(conn)
|
||||
conn.commit()
|
||||
except Exception as e:
|
||||
print("Error evaluating blueprints:", e)
|
||||
|
||||
conn.close()
|
||||
return jsonify({'ok': True, 'towns_updated': len(towns)})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user