Skip to main content

celery debug tasks.

Project description

celery-debug

celery debug tasks.

安装

pip install celery-debug

输出的celery调试服务

  • debug.ping
  • debug.echo
  • debug.sleep
  • debug.raise_error
  • debug.retry_n

启动

  1. 在工作目录下创建celeryconfig.py,添加以下内容

    # concurrency
    worker_concurrency = 10
    worker_pool = "threads"
    # broker_url and result_backend
    broker_url = "redis://redis/0"
    result_backend = "redis://redis/1"
    # internal configs
    accept_content = ["application/json"]
    task_serializer = "json"
    result_accept_content = ["application/json"]
    result_serializer = "json"
    timezone = "Asia/Shanghai"
    broker_connection_retry_on_startup = True
    task_track_started = True
    task_acks_late = True
    task_acks_on_failure_or_timeout = True
    task_reject_on_worker_lost = True
    # 额外新增的配置项
    # 配置后所有任务都使用不同的队列
    use_different_queue = True
    
  2. 使用以下命令启动celery worker

    celery -A celery_debug.app:app worker -l DEBUG 
    

版本记录

v0.1.0

  • 版本首发。

v0.1.1

  • 提供配置项,快速让所有任务都使用不同的队列。

v0.1.2

  • use_different_queue方法做成工具函数。让用户自主控制,避免一引入就强制设置。

v0.1.4

  • use_different_queue自动绑定celery消息队列。
  • 添加deubg.sleep任务。
  • 添加debug.raise_error任务。
  • 添加debug.retry_n任务。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

celery-debug-0.1.4.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

celery_debug-0.1.4-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file celery-debug-0.1.4.tar.gz.

File metadata

  • Download URL: celery-debug-0.1.4.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for celery-debug-0.1.4.tar.gz
Algorithm Hash digest
SHA256 9c65a3daf1f37677ff89a13a5546af8e169d79975b0195da4900aedf70d2aaaa
MD5 013ec5670c83b353850e7f6807731afd
BLAKE2b-256 2af5739df8465e432150cd48fb8e8d6538c5f345a2796a4dd4c0b4f2cc12d8d4

See more details on using hashes here.

File details

Details for the file celery_debug-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for celery_debug-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6d6a559bfe21dea527d243d910fc8ff6f8df1ca5b9a112a400d3203137a318ee
MD5 45f245959b10373bb08685b7239094c0
BLAKE2b-256 293904a0ba7c167607f7266f57fc3f1b0c7e7ccea6a8b5afaca246985c69bf48

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page