Browse Source

quite weird

lyc8503 4 years ago
parent
commit
780637145f
2 changed files with 3 additions and 2 deletions
  1. 2 2
      backend_refactor/gunicorn.conf.py
  2. 1 0
      backend_refactor/pool/thread_pool.py

+ 2 - 2
backend_refactor/gunicorn.conf.py

@@ -183,8 +183,8 @@ proc_name = None
 #
 #
 
 
 
 
-def when_ready(server):
-    server.log.info("Server is ready. Spawning pool threads.")
+def on_starting(server):
+    server.log.info("Server is starting. Spawning pool threads.")
     init_workers()
     init_workers()
 
 
 
 

+ 1 - 0
backend_refactor/pool/thread_pool.py

@@ -22,6 +22,7 @@ def worker():
 
 
 def init_workers(count=2):
 def init_workers(count=2):
     logging.info("Initializing workers...")
     logging.info("Initializing workers...")
+    q = queue.Queue()
     for _ in range(count):
     for _ in range(count):
         threading.Thread(target=worker).start()
         threading.Thread(target=worker).start()