Last active
July 27, 2018 13:10
-
-
Save marraia/dedd23a1e4de56e7603ba2044b4f4fca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private RetryPolicy RetryPolicyPolly() | |
{ | |
return Policy.Handle<HttpRequestException>() | |
//Quantidade de vezes de re-tentativas | |
.Retry(3, (exception, retryCount) => | |
{ | |
var msg = | |
$" RETRYCOUNT: {retryCount} |" + | |
$" STATUSCODE: {result.Result.StatusCode} |" + | |
$" EXCEPTION: {exception} |"; | |
_log.LogWarning(msg); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment