Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/celery/app/trace.py", line 451, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/celery/app/trace.py", line 734, in __protected_call__
return self.run(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/celery/app/builtins.py", line 22, in backend_cleanup
app.backend.cleanup()
File "/usr/local/lib/python3.10/dist-packages/django_celery_results/backends/database.py", line 182, in cleanup
self.TaskModel._default_manager.delete_expired(self.expires)
File "/usr/local/lib/python3.10/dist-packages/django_celery_results/managers.py", line 90, in delete_expired
with transaction.atomic(using=self.db):
File "/usr/local/lib/python3.10/dist-packages/cachalot/monkey_patch.py", line 179, in inner
original(self, exc_type, exc_value, traceback)
File "/usr/local/lib/python3.10/dist-packages/django/db/transaction.py", line 246, in __exit__
connection.commit()
File "/usr/local/lib/python3.10/dist-packages/django/utils/asyncio.py", line 33, in inner
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/django/db/backends/base/base.py", line 266, in commit
self._commit()
File "/usr/local/lib/python3.10/dist-packages/django/db/backends/base/base.py", line 241, in _commit
with self.wrap_database_errors:
File "/usr/local/lib/python3.10/dist-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/local/lib/python3.10/dist-packages/django/db/backends/base/base.py", line 242, in _commit
return self.connection.commit()
django.db.utils.IntegrityError: update or delete on table "django_celery_results_taskresult" violates foreign key constraint "core_taskuserassignm_task_result_id_1ea8deda_fk_django_ce" on table "core_taskuserassignment"
DETAIL: Key (id)=(1082) is still referenced from table "core_taskuserassignment".