浏览代码

Update periodic-tasks.rst to fix import issue (#4194)

The docs were not updated for celery 4, which does not need django-celery library.
Most issues arose were because of the doc does not give clear guidance for celery 4 and above.
Fix issues:
https://github.com/celery/django-celery/issues/496
https://github.com/celery/django-celery/issues/523
https://github.com/celery/django-celery/issues/491 
https://github.com/celery/celery/issues/3637
Patrick Zhang 7 年之前
父节点
当前提交
bda678b9cd
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      docs/userguide/periodic-tasks.rst

+ 8 - 0
docs/userguide/periodic-tasks.rst

@@ -65,6 +65,14 @@ schedule manually.
         $ python manage.py shell
         >>> from djcelery.models import PeriodicTask
         >>> PeriodicTask.objects.update(last_run_at=None)
+    
+    Django-Celery only supports Celery 4.0 and below, for Celery 4.0 and above, do as follow:
+    
+    .. code-block:: console
+
+        $ python manage.py shell
+        >>> from django_celery_beat.models import PeriodicTask
+        >>> PeriodicTask.objects.update(last_run_at=None)
 
 .. _beat-entries: