increased azure repository network timeout to 30 minutes

This commit is contained in:
Ben Evans
2024-11-26 12:18:14 +00:00
committed by Caelan
parent d31d152485
commit c9721bf9f6

View File

@@ -39,10 +39,13 @@ public class AzureRepository : ObjectRepository<AzureDownloadOptions, AzureUploa
}
BlobServiceClient client;
BlobClientOptions clientOptions = new BlobClientOptions();
clientOptions.Retry.NetworkTimeout = TimeSpan.FromMinutes(30);
if (!String.IsNullOrEmpty(options.SasToken)) {
client = new BlobServiceClient(new Uri(serviceUrl), new Azure.AzureSasCredential(options.SasToken));
client = new BlobServiceClient(new Uri(serviceUrl), new AzureSasCredential(options.SasToken), clientOptions);
} else {
client = new BlobServiceClient(new Uri(serviceUrl), new StorageSharedKeyCredential(options.Account, options.Key));
client = new BlobServiceClient(new Uri(serviceUrl), new StorageSharedKeyCredential(options.Account, options.Key), clientOptions);
}
return client.GetBlobContainerClient(options.Container);
}