Saving Method of celery Execution Result in Django

  • 2021-07-18 08:16:07
  • OfStack

As shown below:

pip3 install django-celery-results

INSTALLED_APPS = (..., 'django_celery_results',) # Note that this is the underscore '_'

python3 manage.py migrate django_celery_results

CELERY_RESULT_BACKEND = 'django-db' # Configured in settings. py file

Note that when invoked in the asynchronous task views. py, the result to be recorded must be "Task Function.delay (* args)" so that it can be written to the database table

Specific record results can be seen in the table: django_celery_results_taskresult;


Related articles: