Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save HowardvanRooijen/0a63481827a89ea5b941 to your computer and use it in GitHub Desktop.
Save HowardvanRooijen/0a63481827a89ea5b941 to your computer and use it in GitHub Desktop.
DoNotRetryOnLeaseAcquisitionUnsuccessfulPolicy extension for Endjin.Retry
#region Using Directives
using System;
using Endjin.Core.Retry.Policies;
#endregion
public class DoNotRetryOnLeaseAcquisitionUnsuccessfulPolicy : IRetryPolicy
{
public bool CanRetry(Exception exception)
{
var storageException = exception as LeaseAcquisitionUnsuccessfulException;
if (storageException != null)
{
return false;
}
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment