mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Remove stat points for package download states
This commit is contained in:
parent
6dc8e286ce
commit
f822c36b92
@ -1046,9 +1046,6 @@ namespace Bloxstrap
|
|||||||
|
|
||||||
const int maxTries = 5;
|
const int maxTries = 5;
|
||||||
|
|
||||||
bool statIsRetrying = false;
|
|
||||||
bool statIsHttp = false;
|
|
||||||
|
|
||||||
App.Logger.WriteLine(LOG_IDENT, "Downloading...");
|
App.Logger.WriteLine(LOG_IDENT, "Downloading...");
|
||||||
|
|
||||||
var buffer = new byte[4096];
|
var buffer = new byte[4096];
|
||||||
@ -1101,8 +1098,6 @@ namespace Bloxstrap
|
|||||||
App.Logger.WriteLine(LOG_IDENT, $"An exception occurred after downloading {totalBytesRead} bytes. ({i}/{maxTries})");
|
App.Logger.WriteLine(LOG_IDENT, $"An exception occurred after downloading {totalBytesRead} bytes. ({i}/{maxTries})");
|
||||||
App.Logger.WriteException(LOG_IDENT, ex);
|
App.Logger.WriteException(LOG_IDENT, ex);
|
||||||
|
|
||||||
statIsRetrying = true;
|
|
||||||
|
|
||||||
if (ex.GetType() == typeof(ChecksumFailedException))
|
if (ex.GetType() == typeof(ChecksumFailedException))
|
||||||
{
|
{
|
||||||
App.SendStat("packageDownloadState", "httpFail");
|
App.SendStat("packageDownloadState", "httpFail");
|
||||||
@ -1132,13 +1127,9 @@ namespace Bloxstrap
|
|||||||
{
|
{
|
||||||
App.Logger.WriteLine(LOG_IDENT, "Retrying download over HTTP...");
|
App.Logger.WriteLine(LOG_IDENT, "Retrying download over HTTP...");
|
||||||
packageUrl = packageUrl.Replace("https://", "http://");
|
packageUrl = packageUrl.Replace("https://", "http://");
|
||||||
statIsHttp = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (statIsRetrying)
|
|
||||||
App.SendStat("packageDownloadState", statIsHttp ? "httpSuccess" : "retrySuccess");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ExtractPackage(Package package, List<string>? files = null)
|
private void ExtractPackage(Package package, List<string>? files = null)
|
||||||
|
Loading…
Reference in New Issue
Block a user