Skip to content

Commit

Permalink
Update SyncService.java
Browse files Browse the repository at this point in the history
  • Loading branch information
907739769 committed May 18, 2024
1 parent 736a6c3 commit a65f4a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/cn/jackding/xiaoyasync/SyncService.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class SyncService {

private final String userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36";

private final ExecutorService executorService = Executors.newFixedThreadPool(49);
private final ExecutorService executorService = Executors.newFixedThreadPool(10);

@Scheduled(cron = "0 0 6,18 * * ?")
public void syncFiles() {
Expand Down Expand Up @@ -115,7 +115,7 @@ private void syncFilesRecursively(String currentUrl, String localDir, String rel
}

// 下载或者更新文件
System.setProperty("java.util.concurrent.ForkJoinPool.common.parallelism", "49");
System.setProperty("java.util.concurrent.ForkJoinPool.common.parallelism", "99");
remoteFiles.parallelStream().forEach(file -> {

if (file.endsWith("/")) {
Expand Down

0 comments on commit a65f4a3

Please sign in to comment.