|
@@ -39,23 +39,25 @@ Worker Options:
|
|
|
Set custom prefetch multiplier value for
|
|
|
this worker instance.
|
|
|
Pool Options:
|
|
|
- * -c, --concurrency <concurrency>
|
|
|
+ * -c, --concurrency <concurrency>
|
|
|
Number of child processes processing the
|
|
|
queue. The default is the number of CPUs
|
|
|
- available on your system.
|
|
|
+ available on your system.
|
|
|
+
|
|
|
``` celery worker --help ``` can get more infomation.
|
|
|
+
|
|
|
### woker in Windows
|
|
|
add ``` --pool=solo ``` option
|
|
|
|
|
|
### Calling the task
|
|
|
```shell
|
|
|
->>> from tasks import add
|
|
|
->>> add.hello()
|
|
|
+>>> from tasks import hello
|
|
|
+>>> hello.delay()
|
|
|
```
|
|
|
If your celery app set rsult backend
|
|
|
```
|
|
|
->>> from tasks import add
|
|
|
->>> result = add.hello()
|
|
|
+>>> from tasks import hello
|
|
|
+>>> result = hello.delay
|
|
|
```
|
|
|
The ready() method returns whether the task has finished processing or not:
|
|
|
```
|