agentsclimarketplace

Django celery

Skill mturac/everything-openai-codex/docs/ja-JP/skills/django-celery

DjangoおよびCeleryを使用した非同期タスク処理。タスクキューイング、ワーカー管理、エラー処理、スケジューリング。Redis/RabbitMQ ブローカー統合。From its SKILL.md

Install
npx -y skills add mturac/everything-openai-codex --skill django-celery

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

1.5 KB, 450 tokens by cl100k_base, as published. Nobody here has run it

Django + Celery 非同期タスク

Django でのバックグラウンドジョブと非同期処理。

使用時期

  • メール送信をバックグラウンドで実行
  • 重い処理をスケジュール
  • 定期的なタスクを実行(日報、クリーンアップ)
  • 外部API呼び出しをキューイング
  • 複雑なワークフローを調整

セットアップ

1. Celery インストール

pip install celery redis

2. タスク定義

from celery import shared_task

@shared_task
def send_email(recipient):
    # メール送信ロジック
    pass

3. ワーカー起動

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),
    },
}

エラーハンドリング

  • リトライロジック実装
  • デッドレター処理
  • ロギング構成
  • モニタリング設定(Flower)

詳細については、ドキュメントを参照してください。

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.