django-celery-fulldbresult icon indicating copy to clipboard operation
django-celery-fulldbresult copied to clipboard

OperationalError: (1213, 'Deadlock found when trying to get lock; try restarting transaction')

Open abhishesh opened this issue 8 years ago • 2 comments

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.

abhishesh avatar Sep 14 '17 05:09 abhishesh

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.

bartdag avatar Sep 14 '17 08:09 bartdag

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'

abhishesh avatar Sep 14 '17 11:09 abhishesh