From 992c1c12331bfd5ba7557f30c90de0a6d23e7814 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sat, 24 Oct 2020 22:30:00 +0000 Subject: [PATCH] Monkeypatch earlier --- apiserver/server.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/apiserver/server.py b/apiserver/server.py index a23370a..868c16b 100644 --- a/apiserver/server.py +++ b/apiserver/server.py @@ -3,6 +3,11 @@ logging.basicConfig( format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) +import gevent +from gevent import monkey +monkey.patch_all() +from gevent.pywsgi import WSGIServer + import copy import json import threading @@ -19,12 +24,6 @@ from flask import abort, Flask, request, render_template, stream_with_context, R from werkzeug.exceptions import NotFound from flask_cors import CORS -import gevent -from gevent import monkey -from gevent.pywsgi import WSGIServer - -monkey.patch_all() - database.init() search.init()