Spaces:
Sleeping
Sleeping
| set -e | |
| # Activate the virtual environment | |
| source /app/.venv/bin/activate | |
| # Run download-files | |
| uv run worker.py download-files | |
| # Function to cleanup background processes on exit | |
| cleanup() { | |
| echo "Stopping processes..." | |
| kill $WORKER_PID 2>/dev/null || true | |
| exit | |
| } | |
| trap cleanup SIGTERM SIGINT | |
| # Start worker in background and capture PID | |
| uv run worker.py dev & | |
| WORKER_PID=$! | |
| # Start health server in foreground (this keeps the script running) | |
| uv run health.py | |