diff --git a/cache/cache.py b/cache/cache.py deleted file mode 100644 index 1f3be24..0000000 --- a/cache/cache.py +++ /dev/null @@ -1,2 +0,0 @@ -from flask_caching import Cache -cache = Cache() \ No newline at end of file diff --git a/web.py b/web.py index b4e3f8a..98de048 100755 --- a/web.py +++ b/web.py @@ -1,23 +1,21 @@ from flask import Flask, send_from_directory import sentry_sdk import json -from cache.cache import cache app = Flask(__name__) +app.config.from_file("config.json", load=json.load) +# /threads try: from threads.threads import threads app.register_blueprint(threads, url_prefix='/threads') print(' * Threads blueprint registered') + from threads.cache import cache as thread_cache + print(' * Threads cache type: ' + app.config["CACHE_TYPE"]) + thread_cache.init_app(app) except ImportError: print(' ! Threads blueprint not found') -app.config.from_file("config.json", load=json.load) - -# caching -print(' * Cache type: ' + app.config["CACHE_TYPE"]) -cache.init_app(app) - # perf monitoring & error tracking sentry_config = app.config["SENTRY"] print(' * Monitoring DSN: ' + sentry_config["dsn"])