ShopifySharp.Extensions.DependencyInjection 1.6.0
Summary
ShopifySharp.Extensions.DependencyInjection 1.6.0 adds support for ShopifySharp's new ExponentialRetryPolicy
. Since this is the first policy that requires or supports any kind of configuration, the package has been updated to add defaults for those options to DI when the policy has been added but the options have not. You can override those defaults by supplying your own options:
var policyOptions = new ExponentialRetryPolicyOptions
{
InitialBackoffInMillseconds = 50,
MaximumDelayBetweenRetries = TimeSpan.FromSeconds(1),
MaximumTriesBeforeRequestCancellation = null,
MaximumDelayBeforeRequestCancellation = TimeSpan.FromSeconds(5)
};
services.AddSingleton(policyOptions);
services.AddShopifySharp<ExponentialRetryPolicy>();
If you don't supply any configuration options, the package will use ExponentialRetryPolicyOptions.Default
instead.
Changelog
- Feature: Retry policy with exponential delay by @nozzlegear in #1065
Full Changelog: ShopifySharp.Extensions.DependencyInjection/1.5.0...ShopifySharp.Extensions.DependencyInjection/1.6.0
How to support ShopifySharp
If you find ShopifySharp useful, please consider contributing to the project! If you'd rather contribute financially, you can do so by sponsoring the author here on Github, or by purchasing a copy of The Shopify Development Handbook on Gumroad.