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

@ -119,10 +119,13 @@ public class AuthorFiles
}
private async Task<FileDefinition> PrimeDefinition(RelativePath name)
{
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()