🔧 chore(server.py): configure gunicorn to use UvicornWorker as the worker class for improved performance and compatibility

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-10-04 12:49:30 -03:00
commit 62711a08cd

View file

@ -4,6 +4,8 @@ from gunicorn.app.base import BaseApplication # type: ignore
class LangflowApplication(BaseApplication):
def __init__(self, app, options=None):
self.options = options or {}
self.options["worker_class"] = "uvicorn.workers.UvicornWorker"
self.application = app
super().__init__()