We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ef70f27 + 43d377f commit e9190e5Copy full SHA for e9190e5
run_test.sh
@@ -1,7 +1,20 @@
1
#!/bin/bash
2
+# Run the RQ workers in the background for testing purposes.
3
+#
4
+# Note: This script is intended for testing purposes only. In
5
+# production the workers should be started with a process manager like
6
+# systemd.
7
+
8
rq worker download_object &
9
rq worker create_sip &
10
rq worker submit_sip &
-echo "Press anything to shutdown the workers";
-read -n 1
-killall -s TERM rq
11
12
+# Wait a bit for workers to start and stop outputting to console
13
+sleep 1
14
15
+printf "\nWorkers started:\n%s\n\n" "$(jobs -l)"
16
+printf "Press Ctrl+C to shutdown the workers.\n"
17
+while true; do sleep 10; done
18
19
+# Note: Workers will stop when the script is terminated with Ctrl+C
20
+# because they are background jobs and the script is the parent process.
0 commit comments