fix: backport fixes from a sister project

This commit is contained in:
2025-06-20 23:23:00 +02:00
parent 06679ee165
commit 99e914557a
6 changed files with 43 additions and 7 deletions

View File

@@ -53,6 +53,9 @@ def setup():
sanity_string += f" If you're running a reverse proxy, set {colors.OKCYAN}is_proxied{colors.ENDC} to true to silence this message.\n"
print(sanity_string)
# Should work around disconnects: https://stackoverflow.com/a/61739721
app.config['SQLALCHEMY_ENGINE_OPTIONS'] = {"pool_pre_ping": True}
app.config['SQLALCHEMY_DATABASE_URI'] = f"sqlite:///{config['general']['db_file_path']}"
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.add_url_rule('/', view_func=views.index)