Browse Source

修改初始化s3 client条件

locky 1 year ago
parent
commit
ae7a0b0780
1 changed files with 3 additions and 2 deletions
  1. 3 2
      Controller/DetectControllerV2.py

+ 3 - 2
Controller/DetectControllerV2.py

@@ -30,7 +30,7 @@ class NotificationV2View(View):
         @param request_dict:channel 设备通道号
         @param request_dict:n_time 设备触发报警时间
         @param request_dict:event_type 设备事件类型
-        @param request_dict:is_st 文件类型(0:无,1:图片,2:视频)
+        @param request_dict:is_st 文件类型(0,2:无图, 1:单张图片, 3:三张图片)
         @param request_dict:region 文件存储区域(1:国外, 2:国内)
         @param request_dict:electricity 电量值
         @param request_dict:time_token 时间戳token
@@ -108,7 +108,8 @@ class NotificationV2View(View):
 
             bucket = ''
             aws_s3_client = ''
-            if event_type != 607 and is_st == 1 or is_st == 3:  # 使用aws s3
+            # 推图,初始化s3 client
+            if is_st == 1 or is_st == 3:
                 aws_s3_client = DevicePushService.get_s3_client(region=region)
                 bucket = 'foreignpush' if region == 1 else 'push'