Updated the Stat Tracker to use System.Net.Http types.
Very similar to the previous Update Manager changes. The stat tracker now uses asynchronous threaded calls and manages exceptions better
This commit is contained in:
parent
26a5b00567
commit
b3a2b24daa
5 changed files with 198 additions and 104 deletions
|
|
@ -118,7 +118,7 @@ namespace TShockAPI
|
|||
public static RestManager RestManager;
|
||||
/// <summary>Utils - Static reference to the utilities class, which contains a variety of utility functions.</summary>
|
||||
public static Utils Utils = Utils.Instance;
|
||||
/// <summary>StatTracker - Static reference to the stat tracker, which is created immediately when declared.</summary>
|
||||
/// <summary>StatTracker - Static reference to the stat tracker, which sends some server metrics every 5 minutes.</summary>
|
||||
public static StatTracker StatTracker = new StatTracker();
|
||||
/// <summary>UpdateManager - Static reference to the update checker, which checks for updates and notifies server admins of updates.</summary>
|
||||
public static UpdateManager UpdateManager;
|
||||
|
|
@ -768,12 +768,12 @@ namespace TShockAPI
|
|||
}
|
||||
case "--provider-token":
|
||||
{
|
||||
TShock.StatTracker.ProviderToken = parms[++i];
|
||||
StatTracker.ProviderToken = parms[++i];
|
||||
break;
|
||||
}
|
||||
case "--stats-optout":
|
||||
{
|
||||
TShock.StatTracker.OptOut = true;
|
||||
StatTracker.OptOut = true;
|
||||
break;
|
||||
}
|
||||
case "--no-restart":
|
||||
|
|
@ -894,7 +894,7 @@ namespace TShockAPI
|
|||
}
|
||||
|
||||
UpdateManager = new UpdateManager();
|
||||
StatTracker.Initialize();
|
||||
StatTracker.Start();
|
||||
}
|
||||
|
||||
/// <summary>ComputeMaxStyles - Computes the max styles...</summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue