Refactor LangflowApplication constructor

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-01-14 15:21:39 -03:00
commit 7b1f30ea80

View file

@ -2,11 +2,12 @@ from gunicorn.app.base import BaseApplication # type: ignore
class LangflowApplication(BaseApplication):
def __init__(self, app, options=None):
def __init__(self, options=None):
self.options = options or {}
from langflow.main import create_app
self.options["worker_class"] = "uvicorn.workers.UvicornWorker"
self.application = app
self.application = create_app()
super().__init__()
def load_config(self):