refactor: conditionally disable reload and workers in Makefile based on the presence of the workers variable (#3614)

Conditionally disable reload and workers in Makefile based on the presence of the workers variable
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-09-03 13:28:35 -03:00 committed by GitHub
commit 439565413e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -274,20 +274,20 @@ ifdef login
--factory langflow.main:create_app \
--host 0.0.0.0 \
--port $(port) \
--reload \
$(if $(workers),,--reload) \
--env-file $(env) \
--loop asyncio \
--workers $(workers)
$(if $(workers),--workers $(workers),)
else
@echo "Running backend respecting the $(env) file";
poetry run uvicorn \
--factory langflow.main:create_app \
--host 0.0.0.0 \
--port $(port) \
--reload \
$(if $(workers),,--reload) \
--env-file $(env) \
--loop asyncio \
--workers $(workers)
$(if $(workers),--workers $(workers),)
endif
build_and_run: setup_env ## build the project and run it