Add delete_temp function to cleanup temp database
This commit is contained in:
parent
2666a224ef
commit
7d480c9bf5
1 changed files with 10 additions and 2 deletions
|
|
@ -27,8 +27,16 @@ terminate_process_by_port() {
|
||||||
echo "Process terminated."
|
echo "Process terminated."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete_temp() {
|
||||||
|
cd ../../
|
||||||
|
echo "Deleting temp database"
|
||||||
|
rm temp
|
||||||
|
echo "Temp database deleted."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Trap signals to ensure cleanup on script termination
|
# Trap signals to ensure cleanup on script termination
|
||||||
trap 'terminate_process_by_port 7860; terminate_process_by_port 3000' EXIT
|
trap 'terminate_process_by_port 7860; terminate_process_by_port 3000; delete_temp' EXIT
|
||||||
|
|
||||||
# install playwright if there is not installed yet
|
# install playwright if there is not installed yet
|
||||||
npx playwright install
|
npx playwright install
|
||||||
|
|
@ -46,7 +54,7 @@ sleep 10
|
||||||
poetry install --extras deploy
|
poetry install --extras deploy
|
||||||
|
|
||||||
# Start the backend using 'make backend' in the background
|
# Start the backend using 'make backend' in the background
|
||||||
LANGFLOW_DATABASE_URL=sqlite:// LANGFLOW_AUTO_LOGIN=True poetry run langflow run --backend-only --port 7860 --host 0.0.0.0 --no-open-browser &
|
LANGFLOW_DATABASE_URL=sqlite:///./temp LANGFLOW_AUTO_LOGIN=True poetry run langflow run --backend-only --port 7860 --host 0.0.0.0 --no-open-browser &
|
||||||
|
|
||||||
# Give some time for the backend to start (adjust sleep duration as needed)
|
# Give some time for the backend to start (adjust sleep duration as needed)
|
||||||
sleep 25
|
sleep 25
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue