Планировщик Celery не запускается

Я пытаюсь настроить планировщик, но получаю следующую ошибку "Unrecoverable error"

from __future__ import absolute_import
import os
from celery import Celery
from django.conf import settings

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings.prod')
app = Celery('core')

app.config_from_object("django.conf:settings")
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)


@app.task(bind=True)
def debug_task(self):
    print("Request: {0!r}".format(self.request))
# CELERY STUFF
BROKER_URL = 'redis://localhost:6379'
CELERY_RESULT_BACKEND = 'redis://localhost:6379'
CELERY_ACCEPT_CONTENT = ['application/json']
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TIMEZONE = 'America/Chicago'

Я руководствовался https://realpython.com/asynchronous-tasks-with-django-and-celery/

Вот две фотографии моих ошибок

enter image description here

enter image description here

Вернуться на верх