Harden Surreal migration with retry/coverage fixes and XML docs cleanup
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m17s
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m17s
This commit is contained in:
@@ -55,14 +55,16 @@ public class RetryPolicy : IRetryPolicy
|
||||
|
||||
return await operation();
|
||||
}
|
||||
catch (Exception ex) when (attempt < config.RetryAttempts && IsTransient(ex))
|
||||
{
|
||||
lastException = ex;
|
||||
int delay = config.RetryDelayMs * attempt; // Exponential backoff
|
||||
|
||||
_logger.LogWarning(ex,
|
||||
"Operation {Operation} failed (attempt {Attempt}/{Max}). Retrying in {Delay}ms...",
|
||||
operationName, attempt, config.RetryAttempts, delay);
|
||||
catch (Exception ex) when (IsTransient(ex))
|
||||
{
|
||||
lastException = ex;
|
||||
if (attempt >= config.RetryAttempts) break;
|
||||
|
||||
int delay = config.RetryDelayMs * attempt; // Exponential backoff
|
||||
|
||||
_logger.LogWarning(ex,
|
||||
"Operation {Operation} failed (attempt {Attempt}/{Max}). Retrying in {Delay}ms...",
|
||||
operationName, attempt, config.RetryAttempts, delay);
|
||||
|
||||
await Task.Delay(delay, cancellationToken);
|
||||
}
|
||||
@@ -111,4 +113,4 @@ public class RetryPolicy : IRetryPolicy
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user