From 3f7e92e650125c014d065f8d89e8562d025d3278 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 24 Dec 2021 05:15:43 +0200 Subject: [PATCH] sfd --- files/__main__.py | 6 +++--- files/helpers/wrappers.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/files/__main__.py b/files/__main__.py index 1042f075e..b38a45e89 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -57,16 +57,16 @@ app.config["RATELIMIT_ENABLED"] = True app.config["RATELIMIT_DEFAULTS_DEDUCT_WHEN"]=lambda:True app.config["RATELIMIT_DEFAULTS_EXEMPT_WHEN"]=lambda:False app.config["RATELIMIT_HEADERS_ENABLED"]=True -app.config["CACHE_TYPE"] = "redis" +app.config["CACHE_TYPE"] = "filesystem" app.config["CACHE_DIR"] = "cache" -app.config["RATELIMIT_STORAGE_URL"] = "redis://localhost" +app.config["RATELIMIT_STORAGE_URL"] = "redis://redis" app.config['MAIL_SERVER'] = 'smtp.gmail.com' app.config['MAIL_PORT'] = 587 app.config['MAIL_USE_TLS'] = True app.config['MAIL_USERNAME'] = environ.get("MAIL_USERNAME", "").strip() app.config['MAIL_PASSWORD'] = environ.get("MAIL_PASSWORD", "").strip() -r=redis.Redis(host=environ.get("REDIS_URL", "redis://localhost"), decode_responses=True, ssl_cert_reqs=None) +r=redis.Redis(host="redis://redis", decode_responses=True, ssl_cert_reqs=None) limiter = Limiter( app, diff --git a/files/helpers/wrappers.py b/files/helpers/wrappers.py index fa09a9064..f3dc9fc49 100644 --- a/files/helpers/wrappers.py +++ b/files/helpers/wrappers.py @@ -1,7 +1,7 @@ from .get import * from .alerts import * from files.helpers.const import * -from flask import db_session +from files.__main__ import db_session def get_logged_in_user(): if not (hasattr(g, 'db') and g.db): g.db = db_session()