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
This commit is contained in:
parent
978bdf5fec
commit
6388883f1b
1 changed files with 3 additions and 4 deletions
7
Makefile
7
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),)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue