How can you catch a custom exception from Celery worker, or stop it being prefixed with `celery.backends.base`?
问题 My Celery task raises a custom exception NonTransientProcessingError , which is then caught by AsyncResult.get() . Tasks.py: class NonTransientProcessingError(Exception): pass @shared_task() def throw_exception(): raise NonTransientProcessingError('Error raised by POC model for test purposes') In the Python console: from my_app.tasks import * r = throw_exception.apply_async() try: r.get() except NonTransientProcessingError as e: print('caught NonTrans in type specific except clause') But my