0
I am trying to implement a tasks system with Celery in Django, but it is giving error and I do not know how to solve...
Error that appears on console:
tasks py.
from __future__ import absolute_import, unicode_literals
from celery import task
from datetime import date
@task(ignore_result=True)
def verify_post_date(string):
print(string)
py Settings.
from celery.schedules import crontab
from datetime import timedelta
CELERY_ALWAYS_EAGER = True
CELERY_BROKER_URL = 'redis://localhost:6379/0'
#CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
CELERY_ACCEPT_CONTENT = ['application/json']
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TASK_SERIALIZER = 'json'
CELERY_TIMEZONE = 'America/Sao_Paulo'
CELERY_BEAT_SCHEDULE = {
'verify_post_date': {
'task': 'core.verify_post_date',
'schedule': timedelta(seconds=10),
},
}