Преглед на файлове

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: