beweinreich commited on
Commit
3e56aa5
1 Parent(s): 9323d71

updated entrypoint

Browse files
Files changed (1) hide show
  1. entrypoint.sh +16 -3
entrypoint.sh CHANGED
@@ -1,7 +1,20 @@
1
  #!/bin/bash
2
 
3
- # Start the Celery worker in the background
4
- celery -A tasks worker --loglevel=info &
 
 
5
 
6
- # Start the main application
 
 
 
 
 
 
 
 
7
  python run.py
 
 
 
 
1
  #!/bin/bash
2
 
3
+ # Function to start an RQ worker
4
+ start_worker() {
5
+ rq worker -c rq_settings &
6
+ }
7
 
8
+ # Start three RQ workers
9
+ start_worker
10
+ start_worker
11
+ start_worker
12
+
13
+ # Wait a few seconds to ensure workers are up and running
14
+ sleep 5
15
+
16
+ # Run the Python script
17
  python run.py
18
+
19
+ # Optionally, you can add a trap to clean up workers on exit
20
+ trap 'kill $(jobs -p)' EXIT