first commit
This commit is contained in:
23
start_dev.sh
Normal file
23
start_dev.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Hata durumunda durdurma, çünkü ctrl+c ile kapatmak isteyebiliriz
|
||||
# set -e
|
||||
|
||||
echo "Starting Django Development Server and Celery Worker..."
|
||||
|
||||
# Trap SIGINT (Ctrl+C) to kill all background processes
|
||||
trap 'kill $(jobs -p)' SIGINT
|
||||
|
||||
# Start Celery Worker in background
|
||||
echo "Starting Celery Worker..."
|
||||
celery -A core worker -l info &
|
||||
|
||||
# Wait a bit for Celery to initialize (optional)
|
||||
sleep 2
|
||||
|
||||
# Start Django Development Server
|
||||
echo "Starting Django Server..."
|
||||
python manage.py runserver 0.0.0.0:8000
|
||||
|
||||
# Wait for all background processes to finish
|
||||
wait
|
||||
Reference in New Issue
Block a user