优化异常邮件发送

This commit is contained in:
2024-07-12 11:24:55 +08:00
parent 846c83bf93
commit eb690ad02c
4 changed files with 32 additions and 25 deletions

View File

@@ -12,7 +12,7 @@ import paddleclas
from paddlenlp.utils.doc_parser import DocParser
from sqlalchemy import update
from auto_email.error_email import send_an_error_email
from auto_email.error_email import send_error_email
from config.log import LOGGING_CONFIG
from config.mysql import MysqlSession
from config.photo_review import PHHD_BATCH_SIZE, SLEEP_MINUTES
@@ -446,4 +446,4 @@ if __name__ == '__main__':
sleep(SLEEP_MINUTES * 60)
except Exception as e:
logging.error(traceback.format_exc())
send_an_error_email(program_name='照片涂抹脚本', error_name=repr(e), error_detail=traceback.format_exc())
send_error_email(program_name='照片涂抹脚本', error_name=repr(e), error_detail=traceback.format_exc())