| 语言 | 格式 | 评分 |
|---|---|---|
英语 | .pdf | 3 |
| 摘要 | ||
Celery 2.2.10 is an open source asynchronous task queue/job queue based on distributed message passing, focused on real-time operation and scheduling. Tasks are executed concurrently on worker nodes using multiprocessing, Eventlet or gevent. The recommended message broker is RabbitMQ, with limited support for Redis, Beanstalk, MongoDB, CouchDB and databases. Celery is written in Python, but the protocol can be implemented in any language and can operate with other languages using webhooks. It integrates with Django, Pylons and Flask via add-on packages. The documentation covers getting started, user guide including tasks, workers, periodic tasks, routing, monitoring, and optimization. New remote control commands include stats and dump_active. The software is licensed under the New BSD License. | ||
| AI总结 | ||
Celery 是一个基于分布式消息传递的开源异步任务队列/作业队列,支持实时操作与定时调度。任务由工作节点使用多进程、Eventlet 或 gevent 并发执行,可异步或同步运行。
**核心组件**:使用 Celery 至少需要两个主要组件:一个消息代理(推荐 RabbitMQ,也支持 Redis、数据库等)和一个或多个工作节点,客户端与工作节点通过代理进行消息通信。
**关键功能**:
- **任务**:执行单元,可通过装饰器创建,支持重试、回调、结果存储。
- **周期性任务**:支持定时调度。
- **任务集与子任务**:支持任务分组、链式调用和回调。
- **路由**:可配置任务发送到特定队列和交换器。
- **监控与管理**:提供远程控制命令(如 `stats`、`dump_active`),可查看工作节点统计、正在执行的任务列表,并支持撤销任务、设置速率限制。
**重要更新与改进**(针对 2.2 版本):
- 性能优化:通过设置 `CELERYD_PREFETCH_MULTIPLIER`(默认为 4)调整预取计数,可将任务往返时间从 0.1 秒降至 0.03 秒。
- Webhook 任务改进:`celery.task.rest` 已弃用,改用 `celery.task.http`。
- 任务集结果现在缓存在结果后端。
- 新增依赖:billiard、python-dateutil。
- ETA 任务使用 ISO 8601 日期格式字符串,不再发送 datetime 对象。
- 重试任务不再发送错误邮件。
- 工作节点支持通过广播队列进行远程控制。
- 支持在运行时更改周期性任务的间隔。
**集成**:Celery 易于与 Django、Pylons 和 Flask 集成,有对应的扩展包。
**资源**:可通过邮件列表、IRC 频道获取帮助,在 GitHub 上报告问题或参与开发。软件采用 New BSD 许可证。 | ||
P1
P2
P3
P4
P5
P6
P7
下载文档到本地,方便使用
- 可预览页数已用完,剩余
307 页请下载阅读 -
文档评分














Celery 2.2 Documentation
Celery 1.0 Documentation