Auto retry getting part definitions

This commit is contained in:
Timothy Baldridge 2023-10-12 14:33:59 -06:00
parent b0ea9bb398
commit 5a92aaf115

View File

@ -120,9 +120,12 @@ public class AuthorFiles
private async Task<FileDefinition> PrimeDefinition(RelativePath name)
{
var uri = _baseUri + $"{name}/definition.json.gz";
using var response = await _httpClient.GetAsync(uri);
return await ReadDefinition(await response.Content.ReadAsStreamAsync());
return await CircuitBreaker.WithAutoRetryAllAsync(_logger, async () =>
{
var uri = _baseUri + $"{name}/definition.json.gz";
using var response = await _httpClient.GetAsync(uri);
return await ReadDefinition(await response.Content.ReadAsStreamAsync());
});
}
private async IAsyncEnumerable<S3Object> AllObjects()