refector: send_mail_task优化
This commit is contained in:
parent
f2c02a76d4
commit
e32f82ace7
|
@ -27,5 +27,5 @@ class CustomTask(Task):
|
|||
if settings.DEBUG is False:
|
||||
detail = '{0!r} failed: {1!r}'.format(task_id, exc)
|
||||
myLogger.error(detail)
|
||||
send_mail_task.delay(subject='{}:{}_{}_task_error'.format(settings.SYS_NAME, settings.SYS_VERSION, settings.PROJECT_NAME), message=detail)
|
||||
send_mail_task.delay(subject='task_error', message=detail)
|
||||
return super().on_failure(exc, task_id, args, kwargs, einfo)
|
||||
|
|
Loading…
Reference in New Issue