This commit is contained in:
arys
2026-03-03 17:13:15 +05:00
parent 6a20d95641
commit 10c6e217e4
@@ -123,9 +123,10 @@ public class GeminiVideoGenerationService {
.bodyValue(requestBody)
.retrieve()
.bodyToMono(new ParameterizedTypeReference<Map<String, Object>>() {})
.retryWhen(reactor.util.retry.Retry.backoff(3, Duration.ofSeconds(15))
.filter(t -> t instanceof WebClientResponseException &&
((WebClientResponseException) t).getStatusCode().value() == 429))
// ВНИМАНИЕ: МЫ ОТКЛЮЧИЛИ РЕТРАИ ДЛЯ ОТЛОВА ЧИСТОЙ ОШИБКИ ОТ GOOGLE
// .retryWhen(reactor.util.retry.Retry.backoff(3, Duration.ofSeconds(15))
// .filter(t -> t instanceof WebClientResponseException &&
// ((WebClientResponseException) t).getStatusCode().value() == 429))
.block(Duration.ofMillis(600000));
byte[] videoBytes = extractVideoFromResponse(response);