Monkey patch at the very beginning of the app

This commit is contained in:
Jeremy Zhang 2018-02-11 00:25:53 +00:00
parent 9188d5db11
commit 05cbd63e6f

View File

@ -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']