소스 검색

修复查询推送接口问题

locky 1 년 전
부모
커밋
19504c66a0
2개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 4
      Controller/DetectControllerV2.py
  2. 2 1
      requirements.txt

+ 4 - 4
Controller/DetectControllerV2.py

@@ -403,9 +403,9 @@ class DetectControllerViewV2(View):
                     if storage_location == 1:  # 阿里云oss
                         img_url = oss_img_bucket.sign_url('GET', thumbspng, 300)
                     elif storage_location == 5:  # 华为云
-                        res = obs_client.createSignedUrl(
+                        create_res = obs_client.createSignedUrl(
                             method='GET', bucketName=HUAWEICLOUD_PUSH_BUKET, objectKey=thumbspng, expires=300)
-                        img_url = res.signedUrl
+                        img_url = create_res.signedUrl
                     elif storage_location in [3, 4]:
                         prefix_name = f'{uid}/'
                         img_url = DetectControllerViewV2.oci_object_url(oci, redis_obj, uid, prefix_name)
@@ -468,9 +468,9 @@ class DetectControllerViewV2(View):
                         if storage_location == 1:  # 阿里云oss
                             img_url = oss_img_bucket.sign_url('GET', thumbspng, 300)
                         elif storage_location == 5:  # 华为云
-                            res = obs_client.createSignedUrl(
+                            create_res = obs_client.createSignedUrl(
                                 method='GET', bucketName=HUAWEICLOUD_PUSH_BUKET, objectKey=thumbspng, expires=300)
-                            img_url = res.signedUrl
+                            img_url = create_res.signedUrl
                         elif storage_location in [3, 4]:  # 国外OCI云
                             prefix_name = f'{uid}/'
                             img_url = DetectControllerViewV2.oci_object_url(oci, redis_obj, uid, prefix_name)

+ 2 - 1
requirements.txt

@@ -86,4 +86,5 @@ geoip2==4.7.0
 celery==5.3.6
 django-celery-beat==2.6.0
 oci~=2.125.2
-app-store-server-library==1.3.0
+app-store-server-library==1.3.0
+esdk-obs-python==3.24.6