copied solution for transaction error https://github.com/celery/django-celery/issues/289