MAJOR REFACTOR P1

This commit is contained in:
2025-09-05 20:39:42 +02:00
parent 3b87da9292
commit 4cfd5b2dbe
28 changed files with 293 additions and 301 deletions

20
app/flask_app.py Normal file
View File

@@ -0,0 +1,20 @@
import threading
from flask import Flask
stop_event = threading.Event()
# Flask app to serve status
app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///app.db"
def start_flask() -> None:
try:
# Run flask app
from .routes import bp
app.register_blueprint(bp)
app.run(host="0.0.0.0", port=80, debug=True, use_reloader=False)
except Exception as e:
print("Worker thread exception:", e)
stop_event.set()