Files
dj52/start_dev.sh
Beyhan Oğur ec28a2024d first commit
2026-04-26 22:22:29 +03:00

24 lines
563 B
Bash

#!/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