Fix logging for model pull retry

This commit is contained in:
amithkoujalgi 2025-08-30 18:10:33 +05:30
parent b91f6e6b25
commit 621004e6d8
No known key found for this signature in database
GPG Key ID: E29A37746AF94B70

View File

@ -450,7 +450,7 @@ public class OllamaAPI {
int attempt = currentRetry + 1; int attempt = currentRetry + 1;
if (attempt < maxRetries) { if (attempt < maxRetries) {
long backoffMillis = baseDelayMillis * (1L << currentRetry); long backoffMillis = baseDelayMillis * (1L << currentRetry);
logger.error("Failed to pull model {}, retrying in {} s... (attempt {}/{})", logger.error("Failed to pull model {}, retrying in {}s... (attempt {}/{})",
modelName, backoffMillis/1000, attempt, maxRetries); modelName, backoffMillis/1000, attempt, maxRetries);
try { try {
Thread.sleep(backoffMillis); Thread.sleep(backoffMillis);