优化与调整

This commit is contained in:
2024-05-29 11:31:22 +08:00
parent 1eeb2b1544
commit a94bb613a9
5 changed files with 61 additions and 19 deletions

View File

@@ -3,7 +3,7 @@ import traceback
from auto_email.error_email import send_an_error_email
from config.log import LOGGING_CONFIG
from config.photo_review import RETRY_TIME
from config.photo_review import RETRY_TIME, SEND_ERROR_EMAIL
from photo_review.photo_review import main
# 项目必须从此处启动,否则代码中的相对路径可能导致错误的发生
@@ -19,5 +19,7 @@ if __name__ == '__main__':
main()
except Exception as e:
log.error(traceback.format_exc())
send_an_error_email(program_name='照片审核关键信息抽取脚本', error_name=repr(e), error_detail=traceback.format_exc())
if SEND_ERROR_EMAIL:
send_an_error_email(program_name='照片审核关键信息抽取脚本', error_name=repr(e),
error_detail=traceback.format_exc())
continue