调整重试失败的处理
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
从网络或本地读取图片
|
||||
|
||||
Reference in New Issue
Block a user