Spaces:
Paused
Paused
# Function to start an RQ worker | |
start_worker() { | |
rq worker -c rq_settings & | |
} | |
# Start three RQ workers | |
start_worker | |
start_worker | |
start_worker | |
# Wait a few seconds to ensure workers are up and running | |
sleep 5 | |
# Run the Python script | |
python run.py | |
# Optionally, you can add a trap to clean up workers on exit | |
trap 'kill $(jobs -p)' EXIT | |