From 221075bd670b64a8d981217941efabb8bac1f58b Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Tue, 23 Jul 2024 10:08:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=87=8D=E8=AF=95=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auto_email/error_email.py | 2 +- util/image_util.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/auto_email/error_email.py b/auto_email/error_email.py index 4a3d4e1..2e59136 100644 --- a/auto_email/error_email.py +++ b/auto_email/error_email.py @@ -9,7 +9,7 @@ from auto_email import ERROR_EMAIL_CONFIG, TRY_TIMES, MIN_WAIT_TIME, MAX_WAIT_TI @retry(stop=stop_after_attempt(TRY_TIMES), wait=wait_random(MIN_WAIT_TIME, MAX_WAIT_TIME), reraise=True, - retry_error_callback=lambda x: logging.warning("邮件发送失败!")) + after=lambda x: logging.warning("发送邮件失败!")) def send_email(email_config, massage): smtp_server = email_config["smtp_server"] port = email_config["port"] diff --git a/util/image_util.py b/util/image_util.py index c8d848f..d3602ff 100644 --- a/util/image_util.py +++ b/util/image_util.py @@ -9,7 +9,7 @@ from tenacity import retry, stop_after_attempt, wait_random @retry(stop=stop_after_attempt(3), wait=wait_random(1, 3), reraise=True, - retry_error_callback=lambda e: logging.warning("获取图片失败", exc_info=e)) + after=lambda x: logging.warning("获取图片失败!")) def read(image_path): """ 从网络或本地读取图片