From 439565413efa71b3f1f36a76ab30c5d24f4b673b Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 3 Sep 2024 13:28:35 -0300 Subject: [PATCH] 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 --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d25be61b8..e00adb42b 100644 --- a/Makefile +++ b/Makefile @@ -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