executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
django-celeryDjangoおよびCeleryを使用した非同期タスク処理。タスクキューイング、ワーカー管理、エラー処理、スケジューリング。Redis/RabbitMQ ブローカー統合。
Independent GitHub snapshot · Automated classification · Original documentation governs
Django でのバックグラウンドジョブと非同期処理。
pip install celery redis
from celery import shared_task
@shared_task
def send_email(recipient):
# メール送信ロジック
pass
celery -A myapp worker -l info
send_email.delay(recipient) # すぐにキューに追加、非同期実行
from celery.schedules import crontab
app.conf.beat_schedule = {
'send-report-daily': {
'task': 'app.tasks.send_report',
'schedule': crontab(hour=9, minute=0),
},
}
詳細については、ドキュメントを参照してください。