diff --git a/requirements.txt b/requirements.txt index 5a6d429..834037d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,4 +8,5 @@ paypalrestsdk https://github.com/TitanEmbeds/discord.py/archive/async.zip#egg=discord.py[voice] asyncio_extras kombu -redis \ No newline at end of file +redis +aioredis \ No newline at end of file diff --git a/webapp/titanembeds/app.py b/webapp/titanembeds/app.py index f1d1c39..837c4d1 100644 --- a/webapp/titanembeds/app.py +++ b/webapp/titanembeds/app.py @@ -7,12 +7,17 @@ from .blueprints import api, user, admin, embed, gateway import os from titanembeds.database import get_administrators_list -if config.get("websockets-mode", None) == "eventlet": - import eventlet - eventlet.monkey_patch() -elif config.get("websockets-mode", None) == "gevent": +try: + import uwsgi from gevent import monkey monkey.patch_all() +except: + if config.get("websockets-mode", None) == "eventlet": + import eventlet + eventlet.monkey_patch() + elif config.get("websockets-mode", None) == "gevent": + from gevent import monkey + monkey.patch_all() os.chdir(config['app-location']) app = Flask(__name__, static_folder="static")