|
@@ -28,4 +28,14 @@ print("Task ID:", result.id)
|
|
|
print("Task Status:", result.status)
|
|
|
print("Task Result:", result.get())
|
|
|
|
|
|
-```
|
|
|
+```
|
|
|
+
|
|
|
+命令行中运行:
|
|
|
+```
|
|
|
+celery -A app.celery_app.worker.example worker -l info -Q example-queue -c 1
|
|
|
+```
|
|
|
+-A 指定python模块
|
|
|
+-l info 日志级别
|
|
|
+-Q example-queue 指定worker从example-queue队列中取任务执行
|
|
|
+-c 1 启动一个worker进程
|
|
|
+
|