fix: backport fixes from a sister project
This commit is contained in:
3
ythdd.py
3
ythdd.py
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user