From e54a11c1614b3c038ea3c4dd26824209697ee298 Mon Sep 17 00:00:00 2001 From: Amit Upadhye Date: Tue, 26 Sep 2023 13:05:04 +0530 Subject: [PATCH] Refs #RHIROS-1269 - clean unleash unused code --- ros/lib/app.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/ros/lib/app.py b/ros/lib/app.py index eff20e66..b068bcd3 100644 --- a/ros/lib/app.py +++ b/ros/lib/app.py @@ -5,9 +5,6 @@ from .rbac_interface import ensure_has_permission from .config import get_logger from flask_migrate import Migrate -# Uncomment this when we can sort out the unleash connection issues -# from ros.lib.feature_flags import init_unleash_app -# Since we're using flask_sqlalchemy, we must create the flask app in both processor and web api logger = get_logger(__name__) @@ -21,24 +18,6 @@ def create_app(): 'max_overflow': DB_MAX_OVERFLOW } app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False - # Uncomment this when we can sort out the unleash connection issues - # if not BYPASS_UNLEASH: - # from .config import UNLEASH_URL, UNLEASH_TOKEN, UNLEASH_CACHE_DIR - # if UNLEASH_TOKEN: - # app.config['UNLEASH_APP_NAME'] = 'ros-backend' - # app.config['UNLEASH_ENVIRONMENT'] = 'default' - # app.config['UNLEASH_URL'] = UNLEASH_URL - # app.config['UNLEASH_CUSTOM_HEADERS'] = {'Authorization': f"Bearer{UNLEASH_TOKEN}"} - # app.config['UNLEASH_CACHE_DIRECTORY'] = UNLEASH_CACHE_DIR - # init_unleash_app(app) - # else: - # fallback_msg = ( - # "Unleash is bypassed by config value!" - # if BYPASS_UNLEASH - # else "No API token was provided for the Unleash server connection!" - # ) - # fallback_msg += " Feature flag toggles will default to their fallback values." - # logger.warning(fallback_msg) db.init_app(app) migrate = Migrate() migrate.init_app(app, db)