From 05cbd63e6f9f447d65325e61751783de28489ace Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Sun, 11 Feb 2018 00:25:53 +0000 Subject: [PATCH] Monkey patch at the very beginning of the app --- webapp/titanembeds/app.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/webapp/titanembeds/app.py b/webapp/titanembeds/app.py index 62c3dac..3bb5cff 100644 --- a/webapp/titanembeds/app.py +++ b/webapp/titanembeds/app.py @@ -1,14 +1,4 @@ from config import config -from .database import db -from flask import Flask, render_template, request, session, url_for, redirect, jsonify -from flask_sslify import SSLify -from titanembeds.utils import rate_limiter, discord_api, socketio, babel, redis_store, language_code_list -from .blueprints import api, user, admin, embed, gateway -import os -from titanembeds.database import get_administrators_list -import titanembeds.constants as constants -from datetime import timedelta - try: import uwsgi from gevent import monkey @@ -21,6 +11,16 @@ except: from gevent import monkey monkey.patch_all() +from .database import db +from flask import Flask, render_template, request, session, url_for, redirect, jsonify +from flask_sslify import SSLify +from titanembeds.utils import rate_limiter, discord_api, socketio, babel, redis_store, language_code_list +from .blueprints import api, user, admin, embed, gateway +import os +from titanembeds.database import get_administrators_list +import titanembeds.constants as constants +from datetime import timedelta + os.chdir(config['app-location']) app = Flask(__name__, static_folder="static") app.config['SQLALCHEMY_DATABASE_URI'] = config['database-uri']