Celery分布式任务队列
Choosing a Broker
RabbitMQ
Redis
Databbase(SQLAlchemy/Django Database)
Create app
|
|
Create Celery Server
|
|
Call APP
|
|
Results
如果你想保存结果
|
|
Task
通过使用装饰器task(),就可以创建一个task了.
names
一种好的实践模式是使用模块名字当作人物名123>>> @app.task(name='tasks.add')>>> def add(x, y):... return x + y
Context
request contains information and state related to the executing task.
request的属性
Custom states
|
|