clean app.py
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Torma Kristóf 2020-11-29 01:00:45 +01:00
parent ea76463739
commit 5f2f73c9df
1 changed files with 0 additions and 20 deletions

View File

@ -37,8 +37,6 @@ if SENTRY_DSN:
)
app = Flask(__name__)
app.config['JWT_BLACKLIST_ENABLED'] = True
app.config['JWT_BLACKLIST_TOKEN_CHECKS'] = ['access', 'refresh']
app.config['REDIS_URL'] = REDIS_URL
api = Api(app)
health = HealthCheck()
@ -46,10 +44,6 @@ ma.init_app(app)
flaskred.init_app(app)
CORS(app, origins=ALLOWED_ORIGINS)
formatter = logging.Formatter(
fmt="%(asctime)s - %(levelname)s - %(module)s - %(message)s"
)
@app.before_first_request
def before_first_request():
@ -58,13 +52,6 @@ def before_first_request():
musicbrainzngs.https = True
handler = logging.StreamHandler()
handler.setFormatter(formatter)
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.addHandler(handler)
api.add_resource(LoginApi, '/api/auth/login')
api.add_resource(MeApi, '/api/auth/me')
api.add_resource(ListsApi, '/api/lists')
@ -75,10 +62,3 @@ health.add_check(redis_available)
app.add_url_rule("/healthz", "healthcheck", view_func=lambda: health.run())
register_all_error_handlers(app)
if __name__ == "__main__":
app.run(
debug=bool(DEBUG),
host="0.0.0.0",
port=int(PORT),
)