Created
June 11, 2019 03:39
-
-
Save MonsterRob/5eca4375cb47428b294b356eeb7039e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Celery 最佳实践 | |
| 1 尽量不使用数据库作为broker,建议使用RabbitMQ | |
| 2 使用多个队列 | |
| 3 定义具有优先级的worker | |
| 4 使用celery的错误处理机制 | |
| 5 使用flower 监控 | |
| 6 只有真正需要时再追踪result | |
| 7 调用task时不用传入ORM对象 | |
| 8 尽量简化task | |
| 9 设置task超时 | |
| 10 设置worker数量 | |
| 11 IO密集任务可使用eventlet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment