|
@@ -21,11 +21,11 @@ ctrl-c or
|
|
|
### install "celery"
|
|
|
``` pip install -U "celery[redis]" ```
|
|
|
### Starting the worker
|
|
|
-```shell
|
|
|
+```
|
|
|
celery -A proj worker
|
|
|
```
|
|
|
|
|
|
-#### Options
|
|
|
+* Options
|
|
|
Worker Options:
|
|
|
* -n, --hostname HOSTNAME Set custom hostname (e.g., 'w1@%%h').
|
|
|
Expands: %%h (hostname), %%n (name) and %%d, (domain).
|
|
@@ -45,7 +45,7 @@ Pool Options:
|
|
|
queue. The default is the number of CPUs
|
|
|
available on your system.
|
|
|
|
|
|
-``` celery worker --help ```can get more infomation.
|
|
|
+'''celery worker --help''' can get more infomation.
|
|
|
|
|
|
### woker in Windows
|
|
|
add ``` --pool=solo ``` option
|
|
@@ -58,7 +58,7 @@ add ``` --pool=solo ``` option
|
|
|
If your celery app set rsult backend
|
|
|
```
|
|
|
>>> from tasks import hello
|
|
|
->>> result = hello.delay
|
|
|
+>>> result = hello.delay()
|
|
|
```
|
|
|
The ready() method returns whether the task has finished processing or not:
|
|
|
```
|