Celery 2.2 Documentation
probably want to see some code by now, so here’s an example task adding two numbers: from celery.task import task @task def add(x, y): return x + y You can execute the task in the background, or wait for it you first have to add it to PATH, by adding the following line to the end of your ~/.profile: export PATH="/lol/bin:/lol/sbin:$PATH" Save your profile and reload it: $ source ~/.profile Finally, convention we will call our module tasks.py, and it looks like this: file tasks.py from celery.task import task @task def add(x, y): return x + y Behind the scenes the @task decorator actually creates a0 码力 | 314 页 | 1.26 MB | 1 年前3Celery 2.0 Documentation
want to see some code by now, so here’s an example task adding two numbers: from celery.decorators import task @task def add(x, y): return x + y You can execute the task in the background, or wait for it you first have to add it to PATH, by adding the following line to the end of your ~/.profile: export PATH="/lol/bin:/lol/sbin:$PATH" Save your profile and reload it: $ source ~/.profile Finally, convention is to call it tasks.py. Our addition task looks like this: tasks.py: from celery.decorators import task @task def add(x, y): return x + y All celery tasks are classes that inherit from the Task0 码力 | 165 页 | 492.43 KB | 1 年前3Celery 2.2 Documentation
probably want to see some code by now, so here’s an example task adding two numbers: from celery.task import task @task def add(x, y): return x + y You can execute the task in the background, or wait it you first have to add it to PATH, by adding the following line to the end of your ~/.profile: export PATH="/lol/bin:/lol/sbin:$PATH" Save your profile and reload it: $ source ~/.profile Finally, convention we will call our module tasks.py, and it looks like this: file: tasks.py from celery.task import task @task def add(x, y): return x + y Behind the scenes the @task decorator actually creates0 码力 | 505 页 | 878.66 KB | 1 年前3Celery 2.5 Documentation
probably want to see some code by now, so here’s an example task adding two numbers: from celery.task import task @task def add(x, y): return x + y You can execute the task in the background, or wait for it you first have to add it to PATH, by adding the following line to the end of your ~/.profile: export PATH="/lol/bin:/lol/sbin:$PATH" Save your profile and reload it: $ source ~/.profile Finally, Using Redis Redis is also feature-complete, but power failures or abrupt termination may result in data loss. • Using SQLAlchemy • Using the Django Database Using a database as a message queue is not0 码力 | 400 页 | 1.40 MB | 1 年前3Celery 2.0 Documentation
want to see some code by now, so here’s an example task adding two numbers: from celery.decorators import task @task def add(x, y): return x + y You can execute the task in the background, or wait it you first have to add it to PATH, by adding the following line to the end of your ~/.profile: export PATH="/lol/bin:/lol/sbin:$PATH" Save your profile and reload it: $ source ~/.profile Finally, convention is to call it tasks.py. Our addition task looks like this: tasks.py: from celery.decorators import task @task def add(x, y): return x + y All celery tasks are classes that inherit from the Task0 码力 | 284 页 | 332.71 KB | 1 年前3Celery 2.3 Documentation
probably want to see some code by now, so here’s an example task adding two numbers: from celery.task import task @task def add(x, y): return x + y You can execute the task in the background, or wait for it you first have to add it to PATH, by adding the following line to the end of your ~/.profile: export PATH="/lol/bin:/lol/sbin:$PATH" Save your profile and reload it: $ source ~/.profile Finally, convention we will call our module tasks.py, and it looks like this: file tasks.py from celery.task import task @task def add(x, y): return x + y Behind the scenes the @task decorator actually creates a0 码力 | 334 页 | 1.25 MB | 1 年前3Celery 2.4 Documentation
probably want to see some code by now, so here’s an example task adding two numbers: from celery.task import task @task def add(x, y): return x + y You can execute the task in the background, or wait it you first have to add it to PATH, by adding the following line to the end of your ~/.profile: export PATH="/lol/bin:/lol/sbin:$PATH" Save your profile and reload it: $ source ~/.profile Finally, [http://redis.io/] is also feature-complete, but power failures or abrupt termination may result in data loss. Using SQLAlchemy Using the Django Database Using a database as a message queue is not recommended0 码力 | 543 页 | 957.42 KB | 1 年前3Celery 2.4 Documentation
probably want to see some code by now, so here’s an example task adding two numbers: from celery.task import task @task def add(x, y): return x + y You can execute the task in the background, or wait for it you first have to add it to PATH, by adding the following line to the end of your ~/.profile: export PATH="/lol/bin:/lol/sbin:$PATH" Save your profile and reload it: $ source ~/.profile Finally, Using Redis Redis is also feature-complete, but power failures or abrupt termination may result in data loss. • Using SQLAlchemy • Using the Django Database Using a database as a message queue is not0 码力 | 395 页 | 1.54 MB | 1 年前3Celery 2.5 Documentation
probably want to see some code by now, so here’s an example task adding two numbers: from celery.task import task @task def add(x, y): return x + y You can execute the task in the background, or wait it you first have to add it to PATH, by adding the following line to the end of your ~/.profile: export PATH="/lol/bin:/lol/sbin:$PATH" Save your profile and reload it: $ source ~/.profile Finally, [http://redis.io/] is also feature-complete, but power failures or abrupt termination may result in data loss. Using SQLAlchemy Using the Django Database Using a database as a message queue is not recommended0 码力 | 647 页 | 1011.88 KB | 1 年前3Celery 2.3 Documentation
probably want to see some code by now, so here’s an example task adding two numbers: from celery.task import task @task def add(x, y): return x + y You can execute the task in the background, or wait it you first have to add it to PATH, by adding the following line to the end of your ~/.profile: export PATH="/lol/bin:/lol/sbin:$PATH" Save your profile and reload it: $ source ~/.profile Finally, convention we will call our module tasks.py, and it looks like this: file: tasks.py from celery.task import task @task def add(x, y): return x + y Behind the scenes the @task decorator actually creates0 码力 | 530 页 | 900.64 KB | 1 年前3
共 51 条
- 1
- 2
- 3
- 4
- 5
- 6