调整重试失败的处理

This commit is contained in:
2024-07-23 10:08:07 +08:00
parent 352aecf69d
commit 221075bd67
2 changed files with 2 additions and 2 deletions

View File

@@ -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):
"""
从网络或本地读取图片