فهرست منبع

Update whatsnew-4.0 (#3909)

Issue: https://github.com/celery/celery/issues/3874
Primož Kerin 9 سال پیش
والد
کامیت
655e25fe25
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      docs/whatsnew-4.0.rst

+ 1 - 1
docs/whatsnew-4.0.rst

@@ -551,7 +551,7 @@ these manually:
     class CustomTask(Task):
     class CustomTask(Task):
         def run(self):
         def run(self):
             print('running')
             print('running')
-    app.register_task(CustomTask())
+    CustomTask = app.register_task(CustomTask())
 
 
 The best practice is to use custom task classes only for overriding
 The best practice is to use custom task classes only for overriding
 general behavior, and then using the task decorator to realize the task:
 general behavior, and then using the task decorator to realize the task: