Skip to content

Commit 2a54d7f

Browse files
committed
Decrease concurrent download rate
1 parent 195271d commit 2a54d7f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/net/neoforged/waifu/GameVersionIndexService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public void runWithExceptions() {
9797
// Reverse the order of the files so we index older ones first
9898
Collections.reverse(files);
9999

100-
try (var exec = Executors.newFixedThreadPool(20, Thread.ofVirtual().name("mod-downloader-" + platform.getName() + "-" + version + "-", 0).factory())) {
100+
try (var exec = Executors.newFixedThreadPool(10, Thread.ofVirtual().name("mod-downloader-" + platform.getName() + "-" + version + "-", 0).factory())) {
101101
indexer.downloadAndConsiderConcurrently(files, exec);
102102
}
103103

src/main/java/net/neoforged/waifu/platform/impl/cf/CurseForgePlatform.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ private synchronized File getFile() {
234234
try {
235235
file = api.getHelper().getFiles(fileId).orElseThrow().get(0);
236236
} catch (Exception ex) {
237-
Main.LOGGER.error("Exception trying to get file {}... retrying in 15 seconds", fileId, ex);
237+
Main.LOGGER.error("Exception trying to get file {}... retrying in 45 seconds", fileId, ex);
238238
try {
239-
Thread.sleep(15 * 1000L);
239+
Thread.sleep(45 * 1000L);
240240
} catch (Exception e) {
241241
throw new RuntimeException(e);
242242
}

0 commit comments

Comments
 (0)