simply scalability test failure handling

This commit is contained in:
Ben 2024-06-06 10:12:11 +02:00
parent e53a644718
commit 9900db8d25
No known key found for this signature in database
GPG Key ID: 541B9D8C9F1426A1
1 changed files with 2 additions and 25 deletions

View File

@ -190,10 +190,7 @@ namespace CodexPlugin
return new Retry(description, timeSet.HttpRetryTimeout(), timeSet.HttpCallRetryDelay(), failure => return new Retry(description, timeSet.HttpRetryTimeout(), timeSet.HttpCallRetryDelay(), failure =>
{ {
onFailure(failure); onFailure(failure);
if (failure.Duration.TotalSeconds < timeSet.HttpCallTimeout().TotalSeconds) Investigate(log, failure, timeSet);
{
Investigate(log, failure, timeSet);
}
}); });
} }
@ -212,8 +209,7 @@ namespace CodexPlugin
} }
else else
{ {
log.Log("Got valid response from debug/info. Checking storage statistics..."); log.Log("Got valid response from debug/info.");
CheckSpaceStatistics(log, failure);
} }
} }
catch (Exception ex) catch (Exception ex)
@ -224,25 +220,6 @@ namespace CodexPlugin
} }
} }
private void CheckSpaceStatistics(ILog log, Failure failure)
{
try
{
LogSpaceStatistics();
}
catch (Exception e)
{
log.Log("Failed to get space statistics: " + e);
DownloadLog();
Throw(failure);
}
}
private void LogSpaceStatistics()
{
tools.GetLog().Log($"Space statistics: {Space()}");
}
private void Throw(Failure failure) private void Throw(Failure failure)
{ {
throw failure.Exception; throw failure.Exception;