# python-celery **Repository Path**: personal_items/python-celery ## Basic Information - **Project Name**: python-celery - **Description**: 大型网站核心技术Celery异步讲解 - **Primary Language**: Python - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 2 - **Created**: 2021-01-03 - **Last Updated**: 2022-07-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # python-celery #### 介绍 大型网站核心技术Celery异步讲解 #### 软件架构 软件架构说明 #### 安装教程 1. xxxx 2. xxxx 3. xxxx #### 使用说明 1. xxxx 2. xxxx 3. xxxx #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) #### 项目说明 * day01 * task01.py `【Celery+Redis】celery实现异步任务 2020/01/05 23:20` ```shell script 启动Celery celery -A day01.task01 worker -l INFO ``` * day02 * `【Celery+Redis】配置信息抽取 2021/01/10 15:59` * `【Celery+Redis】celery常用配置 2021/01/10 16:44` * `【Celery+Redis】调用异步任务的方法 2021/01/10 17:13` * `【Celery+Redis】task参数详解 2021/01/10 17:50` ```shell script 启动Celery celery -A day02.apps worker -l INFO ``` * day03 `重点` * `【Celery+Redis】多队列及多消费者 2021/01/12 22:05` ```shell script 不指定队列名,启动多个worker celery -A day03.apps worker -l INFO -n worker01@h celery -A day03.apps worker -l INFO -n worker02@h ``` ```shell script 配置多个队列,启动多个worker celery -A day03.apps worker -l INFO -n worker01@h -Q apps_task1 celery -A day03.apps worker -l INFO -n worker02@h -Q apps_task2 ``` ```python # 配置文件的方式,配置多个队列 from kombu import Queue """3.配置文件的方式 配置对个队列""" CELERY_QUEUES = ( Queue('apps_task1', routing_key='apps_task1'), Queue('apps_task2', routing_key='apps_task2') ) CELERY_ROUTES = { 'day03.apps.task1.add': {'queue': 'apps_task1', 'routing_key': 'apps_task1'}, 'day03.apps.task1.subtract': {'queue': 'apps_task1', 'routing_key': 'apps_task1'}, 'day03.apps.task2.multiply': {'queue': 'apps_task2', 'routing_key': 'apps_task2'}, 'day03.apps.task2.devide': {'queue': 'apps_task2', 'routing_key': 'apps_task2'} } ``` ```shell script 配置多个队列,启动多个worker celery -A day03.apps worker -l INFO -n worker01@h -Q apps_task1 celery -A day03.apps worker -l INFO -n worker02@h -Q apps_task2 ``` * day04 `重点` * `【Celery+Redis】定时任务 2021/01/12 23:09` * `【Celery+Redis】定时任务配置属性详解 2021/01/13 22:03` * shell.md `启动命令等` * day05 `重点` * `【Celery+Rabbitmq】rabbitmq的异步任务 2021/01/17 14:40` * day06 `重点` * `【Celery+Rabbitmq】rabbitmq任务队列和交换机 2021/01/20 20:56` * `【Celery+Rabbitmq】消息中间件实现定时任务 2021/01/20 22:29` * day07 `重点` * `Django+Celery 2021/01/23 13:54` * project01 `实战-爬虫 爬取新浪新闻` * `【Celery+Redis】实战-爬虫部分完成 2021/01/13 23:05` * project02 `实战 - Celery+Rabbitmq百萬級Excel數據導入Mysql` * `【Celery+Rabbitmq】实战-Excel数据导入MySQL 2021/01/20 22:55` * project03 `全部课程实战` * `【Celery实战】项目环境搭建 2021/01/23 15:55`