Skip to content

Commit 7925022

Browse files
committed
Fix Logging Spam
1 parent 8e7d178 commit 7925022

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/main/java/me/Logicism/JavaHordeBridge/core/KAIGenerator.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,32 +40,32 @@ public String startGeneration(JSONObject payload) {
4040
} else if (generationData.getResponseCode() == 422) {
4141
generation = "payload validation error";
4242
} else if (generationData.getResponseCode() == 503) {
43-
bridge.getLogger().debug("Client is busy (attempt " + retryCount++ + "), retrying generation...");
43+
bridge.getLogger().debug("Client is busy (attempt " + retryCount++ + "), retrying generation in 5 seconds...");
4444

4545
try {
46-
TimeUnit.SECONDS.sleep(1);
46+
TimeUnit.SECONDS.sleep(5);
4747
} catch (InterruptedException ignored) {
4848
}
4949
} else {
50-
bridge.getLogger().debug("Client responded with " + generationData.getResponseCode() + " (attempt " + retryCount++ + "), retrying generation...");
50+
bridge.getLogger().debug("Client responded with " + generationData.getResponseCode() + " (attempt " + retryCount++ + "), retrying generation in 5 seconds...");
5151

5252
try {
53-
TimeUnit.SECONDS.sleep(1);
53+
TimeUnit.SECONDS.sleep(5);
5454
} catch (InterruptedException ignored) {
5555
}
5656
}
5757
} catch (JSONException e) {
58-
bridge.getLogger().debug("Client returned unexpected response (attempt " + retryCount++ + "), retrying generation in 10 seconds...");
58+
bridge.getLogger().debug("Client returned unexpected response (attempt " + retryCount++ + "), retrying generation in 5 seconds...");
5959

6060
try {
61-
TimeUnit.SECONDS.sleep(10);
61+
TimeUnit.SECONDS.sleep(5);
6262
} catch (InterruptedException ignored) {
6363
}
6464
} catch (IOException e) {
65-
bridge.getLogger().debug("Client is unavailable (attempt " + retryCount++ + "), retrying generation...");
65+
bridge.getLogger().debug("Client is unavailable (attempt " + retryCount++ + "), retrying generation in 5 seconds...");
6666

6767
try {
68-
TimeUnit.SECONDS.sleep(1);
68+
TimeUnit.SECONDS.sleep(5);
6969
} catch (InterruptedException ignored) {
7070
}
7171
}

0 commit comments

Comments
 (0)