Spaces:
Running
Running
File size: 445 Bytes
7effb2a a8be403 650da2e a8be403 650da2e a8be403 650da2e 7effb2a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #!/bin/bash
# Launch rqscheduler --url $REDIS_URL and rq workers in the background
# if REDIS_URL is set and ENV is not test
if [[ -n "$REDIS_URL" && "$ENV" != "test" ]]; then
echo "Starting rq scheduler and workers..."
rq worker-pool -n ${NB_RQ_WORKERS:-1} --url $REDIS_URL &
rqscheduler --url $REDIS_URL &
else
echo "Skipping rq scheduler and workers startup."
fi
# Run the API
uvicorn src.main:app --host 0.0.0.0 --port 7860 |