mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
This commit is contained in:
@@ -460,8 +460,15 @@ namespace Jackett.Common.Indexers
|
|||||||
NumberOfRetryAttempts,
|
NumberOfRetryAttempts,
|
||||||
retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt) / 4),
|
retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt) / 4),
|
||||||
onRetry: (exception, timeSpan, context) =>
|
onRetry: (exception, timeSpan, context) =>
|
||||||
|
{
|
||||||
|
if (exception.Result == null)
|
||||||
|
{
|
||||||
|
logger.Warn($"Request to {DisplayName} failed with exception '{exception.Exception.Message}'. Retrying in {timeSpan.TotalSeconds}s... (Attempt {attemptNumber} of {NumberOfRetryAttempts}).");
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
logger.Warn($"Request to {DisplayName} failed with status {exception.Result.Status}. Retrying in {timeSpan.TotalSeconds}s... (Attempt {attemptNumber} of {NumberOfRetryAttempts}).");
|
logger.Warn($"Request to {DisplayName} failed with status {exception.Result.Status}. Retrying in {timeSpan.TotalSeconds}s... (Attempt {attemptNumber} of {NumberOfRetryAttempts}).");
|
||||||
|
}
|
||||||
attemptNumber++;
|
attemptNumber++;
|
||||||
});
|
});
|
||||||
return retryPolicy;
|
return retryPolicy;
|
||||||
|
Reference in New Issue
Block a user