Browse Source

whatever?

lyc8503 3 years ago
parent
commit
b3c00bdbf1
2 changed files with 2 additions and 4 deletions
  1. 1 3
      backend_refactor/app.py
  2. 1 1
      backend_refactor/gunicorn.conf.py

+ 1 - 3
backend_refactor/app.py

@@ -66,9 +66,7 @@ def error_handler(e):
     return make_response(500, "unknown internal server error.", {})
 
 
-@app.before_first_request
-def before_first_request():
-    init_workers()
+init_workers()
 
 
 if __name__ == '__main__':

+ 1 - 1
backend_refactor/gunicorn.conf.py

@@ -65,7 +65,7 @@ backlog = 2048
 #       A positive integer. Generally set in the 1-5 seconds range.
 #
 
-workers = 5
+workers = 1
 worker_class = 'sync'
 worker_connections = 1000
 timeout = 15