FOCUSCurrently working on ScheduleSomething and LayerdEvents algorithmsLearn More
FOCUSCurrently working on ScheduleSomething and LayerdEvents algorithmsLearn More
FOCUSCurrently working on ScheduleSomething and LayerdEvents algorithmsLearn More
FOCUSCurrently working on ScheduleSomething and LayerdEvents algorithmsLearn More
DevelopmentOperations & Runbooks
Runbook: Restart Celery Workers
DocsdevelopmentOperations & RunbooksRunbook: Restart Celery Workers
GitHub Live Sync

Runbook: Restart Celery Workers

Live technical documentation fetched from GitHub repository omghante/metapilot/docs/operations/runbooks/restart-celery.md

Runbook: Restarting Celery Workers & Beat

Procedure for safely restarting background task workers without interrupting active broadcast jobs.

Procedure Steps

1. Send Warm Shutdown Signal

Send
SIGTERM
to worker processes so active tasks complete before exit:
bash
pkill -TERM -f "celery worker"

2. Verify Task Completion

Check active task count:
bash
celery -A core inspect active

3. Restart Workers & Beat Daemon

bash
# Restart Celery Worker
celery -A core worker -Q celery,scheduler,jobs --loglevel=info --concurrency=4 &

# Restart Celery Beat
celery -A core beat --scheduler django_celery_beat.schedulers:DatabaseScheduler --loglevel=info &