From 6388883f1b4ef26d0e56fa42783dcd843a188042 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 3 Sep 2024 17:58:35 -0300 Subject: [PATCH] fix: update Makefile to conditionally enable --reload based on worker count (#3675) * Update Makefile to handle backend port kill errors * Update Makefile to conditionally enable --reload based on worker count --- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index e00adb42b..563f36a8d 100644 --- a/Makefile +++ b/Makefile @@ -265,16 +265,15 @@ frontendc: install_frontendc make run_frontend - backend: setup_env install_backend ## run the backend in development mode - @-kill -9 $$(lsof -t -i:7860) + @-kill -9 $$(lsof -t -i:7860) || true ifdef login @echo "Running backend autologin is $(login)"; LANGFLOW_AUTO_LOGIN=$(login) poetry run uvicorn \ --factory langflow.main:create_app \ --host 0.0.0.0 \ --port $(port) \ - $(if $(workers),,--reload) \ + $(if $(filter-out 1,$(workers)),, --reload) \ --env-file $(env) \ --loop asyncio \ $(if $(workers),--workers $(workers),) @@ -284,7 +283,7 @@ else --factory langflow.main:create_app \ --host 0.0.0.0 \ --port $(port) \ - $(if $(workers),,--reload) \ + $(if $(filter-out 1,$(workers)),, --reload) \ --env-file $(env) \ --loop asyncio \ $(if $(workers),--workers $(workers),)