Gave up using WebSocket

Flask-SocketIO does not fully compatible with Gunicorn, and it limited to 1 worker, which it will takes forever to finish loading the webpage. Switched back to  using ajax.
This commit is contained in:
Donald Cheng Hong Zou
2022-03-04 22:09:01 -05:00
parent 4a1a6c5933
commit 65f31a0b38
8 changed files with 245 additions and 177 deletions

View File

@@ -4,8 +4,7 @@ import dashboard
app_host, app_port = dashboard.get_host_bind()
worker_class = 'gthread'
# workers = multiprocessing.cpu_count() * 2 + 1
workers = 1
workers = multiprocessing.cpu_count() * 2 + 1
threads = 4
bind = f"{app_host}:{app_port}"
daemon = True