소스 검색

去掉synchronized

dsx 1 년 전
부모
커밋
4e183f58dc
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 2
      src/main/java/com/fdkankan/download/service/impl/DownloadServiceImpl.java
  2. 1 1
      src/main/resources/application-dev.yml

+ 2 - 2
src/main/java/com/fdkankan/download/service/impl/DownloadServiceImpl.java

@@ -392,7 +392,7 @@ public class DownloadServiceImpl implements IDownloadService {
                 }
             }
             List<ImageTypeDetail> imageTypeDetails = Collections.synchronizedList(items);
-            synchronized(imageTypeDetails){
+//            synchronized(imageTypeDetails){
                 imageTypeDetails.parallelStream().forEach(item->{
                 String par = "?x-oss-process=image/resize,m_lfit,w_" + imageType.getSize() + "/crop,w_512,h_512,x_" + item.getX() + ",y_" + item.getY();
 //                if(FYunTypeEnum.AWS.code().equals(uploadType)){
@@ -418,7 +418,7 @@ public class DownloadServiceImpl implements IDownloadService {
                 this.downloadFile(url, path + fky);
 //                this.downloadFile(url, path);
                 });
-            }
+//            }
         }
 
     }

+ 1 - 1
src/main/resources/application-dev.yml

@@ -119,7 +119,7 @@ rsync:
 
 
 
-#cutImgType: oss   #oss-阿里云接口切图  local-本地切图
+cutImgType: oss   #oss-阿里云接口切图  local-本地切图