django-celery-fulldbresult
django-celery-fulldbresult copied to clipboard
OperationalError: (1213, 'Deadlock found when trying to get lock; try restarting transaction')
Executing this code in celery task
t = TaskResultMeta.objects.filter(Q(task__startswith='myapp.tasks.sm')).filter(some_query)
t.delete()
Using Django 1.9.2 with Mysql.
We would more details. Which version of django celery fulldbresult and which version of celery are you using? Did you set any custom settings mentioned in the README?
django-celery-fulldbresult does not perform any lock or wrap anything in an atomic block so the issue may be with django celery itself.
celery==3.1.23
django-celery==3.1.17
django-celery-fulldbresult==0.5.5
CELERY_ALWAYS_EAGER = False
CELERY_IGNORE_RESULT = False
CELERY_RESULT_BACKEND = 'django_celery_fulldbresult.result_backends:DatabaseResultBackend'
DJANGO_CELERY_FULLDBRESULT_TRACK_PUBLISH = True
DJANGO_CELERY_FULLDBRESULT_OVERRIDE_DJCELERY_ADMIN = True
CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler'