celery-debug


Namecelery-debug JSON
Version 0.1.4 PyPI version JSON
download
home_pageNone
Summarycelery debug tasks.
upload_time2024-05-24 14:48:05
maintainerChen YuBo
docs_urlNone
authorChen YuBo
requires_pythonNone
licenseMIT
keywords celery debug tasks
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # celery-debug

celery debug tasks.

## 安装

```shell
pip install celery-debug
```

## 输出的celery调试服务

- debug.ping
- debug.echo
- debug.sleep
- debug.raise_error
- debug.retry_n

## 启动

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

    ```python
    # 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

    ```shell
    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`任务。



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "celery-debug",
    "maintainer": "Chen YuBo",
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "celery debug tasks",
    "author": "Chen YuBo",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/2a/f5/739df8465e432150cd48fb8e8d6538c5f345a2796a4dd4c0b4f2cc12d8d4/celery-debug-0.1.4.tar.gz",
    "platform": null,
    "description": "# celery-debug\n\ncelery debug tasks.\n\n## \u5b89\u88c5\n\n```shell\npip install celery-debug\n```\n\n## \u8f93\u51fa\u7684celery\u8c03\u8bd5\u670d\u52a1\n\n- debug.ping\n- debug.echo\n- debug.sleep\n- debug.raise_error\n- debug.retry_n\n\n## \u542f\u52a8\n\n1. \u5728\u5de5\u4f5c\u76ee\u5f55\u4e0b\u521b\u5efa`celeryconfig.py`\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\n\n    ```python\n    # concurrency\n    worker_concurrency = 10\n    worker_pool = \"threads\"\n    # broker_url and result_backend\n    broker_url = \"redis://redis/0\"\n    result_backend = \"redis://redis/1\"\n    # internal configs\n    accept_content = [\"application/json\"]\n    task_serializer = \"json\"\n    result_accept_content = [\"application/json\"]\n    result_serializer = \"json\"\n    timezone = \"Asia/Shanghai\"\n    broker_connection_retry_on_startup = True\n    task_track_started = True\n    task_acks_late = True\n    task_acks_on_failure_or_timeout = True\n    task_reject_on_worker_lost = True\n    # \u989d\u5916\u65b0\u589e\u7684\u914d\u7f6e\u9879\n    # \u914d\u7f6e\u540e\u6240\u6709\u4efb\u52a1\u90fd\u4f7f\u7528\u4e0d\u540c\u7684\u961f\u5217\n    use_different_queue = True\n    ```\n\n2. \u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u542f\u52a8celery worker\n\n    ```shell\n    celery -A celery_debug.app:app worker -l DEBUG \n    ```\n\n## \u7248\u672c\u8bb0\u5f55\n\n### v0.1.0\n\n- \u7248\u672c\u9996\u53d1\u3002\n\n### v0.1.1\n\n- \u63d0\u4f9b\u914d\u7f6e\u9879\uff0c\u5feb\u901f\u8ba9\u6240\u6709\u4efb\u52a1\u90fd\u4f7f\u7528\u4e0d\u540c\u7684\u961f\u5217\u3002\n\n### v0.1.2\n\n- use_different_queue\u65b9\u6cd5\u505a\u6210\u5de5\u5177\u51fd\u6570\u3002\u8ba9\u7528\u6237\u81ea\u4e3b\u63a7\u5236\uff0c\u907f\u514d\u4e00\u5f15\u5165\u5c31\u5f3a\u5236\u8bbe\u7f6e\u3002\n\n### v0.1.4\n\n- `use_different_queue`\u81ea\u52a8\u7ed1\u5b9a`celery`\u6d88\u606f\u961f\u5217\u3002\n- \u6dfb\u52a0`deubg.sleep`\u4efb\u52a1\u3002\n- \u6dfb\u52a0`debug.raise_error`\u4efb\u52a1\u3002\n- \u6dfb\u52a0`debug.retry_n`\u4efb\u52a1\u3002\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "celery debug tasks.",
    "version": "0.1.4",
    "project_urls": null,
    "split_keywords": [
        "celery",
        "debug",
        "tasks"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "293904a0ba7c167607f7266f57fc3f1b0c7e7ccea6a8b5afaca246985c69bf48",
                "md5": "45f245959b10373bb08685b7239094c0",
                "sha256": "6d6a559bfe21dea527d243d910fc8ff6f8df1ca5b9a112a400d3203137a318ee"
            },
            "downloads": -1,
            "filename": "celery_debug-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "45f245959b10373bb08685b7239094c0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4517,
            "upload_time": "2024-05-24T14:48:03",
            "upload_time_iso_8601": "2024-05-24T14:48:03.398181Z",
            "url": "https://files.pythonhosted.org/packages/29/39/04a0ba7c167607f7266f57fc3f1b0c7e7ccea6a8b5afaca246985c69bf48/celery_debug-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2af5739df8465e432150cd48fb8e8d6538c5f345a2796a4dd4c0b4f2cc12d8d4",
                "md5": "013ec5670c83b353850e7f6807731afd",
                "sha256": "9c65a3daf1f37677ff89a13a5546af8e169d79975b0195da4900aedf70d2aaaa"
            },
            "downloads": -1,
            "filename": "celery-debug-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "013ec5670c83b353850e7f6807731afd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4222,
            "upload_time": "2024-05-24T14:48:05",
            "upload_time_iso_8601": "2024-05-24T14:48:05.335467Z",
            "url": "https://files.pythonhosted.org/packages/2a/f5/739df8465e432150cd48fb8e8d6538c5f345a2796a4dd4c0b4f2cc12d8d4/celery-debug-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-24 14:48:05",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "celery-debug"
}
        
Elapsed time: 0.85618s