Properly pass the name of the exception

This commit is contained in:
Joshua Boniface 2023-11-16 18:05:52 -05:00
parent 73a4795967
commit dd6a38d5ea
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ def fail(celery, msg, exception=None, current=1, total=1):
if exception is None:
exception = TaskFailure
msg = f"{exception}: {msg}"
msg = f"{type(exception()).__name__}: {msg}"
logger = getLogger(__name__)
logger.error(msg)