优化ucloud的日志及重试机制
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import datetime
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
from decimal import Decimal
|
||||
from io import BytesIO
|
||||
from itertools import groupby
|
||||
@@ -9,10 +8,9 @@ from itertools import groupby
|
||||
import requests
|
||||
from PIL import ImageDraw, Image, ImageFont
|
||||
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
from db import MysqlSession
|
||||
from db.mysql import ZxIeCost, ZxIeDischarge, ZxIeSettlement, ZxPhhd, ZxOcr, ZxPhrec
|
||||
from ucloud import ucloud
|
||||
from ucloud import ufile
|
||||
|
||||
|
||||
def check_ie_result(pk_phhd):
|
||||
@@ -78,7 +76,7 @@ def check_ie_result(pk_phhd):
|
||||
ZxPhrec.pk_phhd == pk_phhd).all()
|
||||
for phrec in phrecs:
|
||||
img_name = phrec.cfjaddress
|
||||
img_path = ucloud.get_private_url(img_name)
|
||||
img_path = ufile.get_private_url(img_name)
|
||||
|
||||
response = requests.get(img_path)
|
||||
image = Image.open(BytesIO(response.content)).convert("RGB")
|
||||
|
||||
Reference in New Issue
Block a user