forked from FrederikBaerentsen/BrickTracker
Create the app outside of the global context of app.py to avoid any interference
This commit is contained in:
@@ -96,6 +96,6 @@ def setup_app(app: Flask) -> None:
|
||||
g.version = __version__
|
||||
|
||||
# Make sure all connections are closed at the end
|
||||
@app.teardown_appcontext
|
||||
def close_connections(exception, /) -> None:
|
||||
@app.teardown_request
|
||||
def teardown_request(_: BaseException | None) -> None:
|
||||
close()
|
||||
|
||||
Reference in New Issue
Block a user