I have set up Django with Celery, using django_celery_results and django_celery_beat to schedule tasks and store the results. The tasks are running successfully, but I've encountered an issue with the django_celery_results table.
The django_celery_results table in my database only contains UUID, task state, and completed time. However, I expected to see additional fields such as periodictaskname and taskname. The absence of these fields is causing difficulties in tracking and managing scheduled tasks.
`#celery.py`
celery.conf.result_backend = os.environ.get('DATABASE_URL')
I have reviewed the documentation for django_celery_results and django_celery_beat but couldn't find a clear solution. I also checked my Celery configuration, and everything seems to be in order.
I expect the django_celery_results table to include fields such as periodictaskname and taskname in addition to UUID, task state, and completed time.
django_celery_results
alredy includes these fields: Task ID, Periodic Task Name, Task Name, Completed DateTime, Task State, Worker.Please be sure
django_celery_results
is added toINSTALLED_APPS
insettings.py
:Please do not forget database migration after adding apps. Then, you should return result in dict type, after celery tasks done like this sample: