mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-16 06:20:34 +00:00
Fix monitoring plugin (#3191)
* Misc.
* Fix ASF crash
* Remove warning about automatic update of custom plugins if there is only official plugins enabled
* Fix previous mistake
* Revert "Fix ASF crash"
This reverts commit 42209e93ce.
This commit is contained in:
@@ -198,7 +198,7 @@ internal sealed class MonitoringPlugin : OfficialPlugin, IDisposable, IGitHubPlu
|
||||
$"{MetricNamePrefix}_bot_farming_time_remaining_{Units.Minutes}", static () => {
|
||||
IEnumerable<Bot> bots = Bot.Bots?.Values ?? [];
|
||||
|
||||
return bots.Select(static bot => new Measurement<double>(bot.CardsFarmer.TimeRemaining.TotalMinutes, new KeyValuePair<string, object?>(TagNames.BotName, bot.BotName), new KeyValuePair<string, object?>(TagNames.SteamID, bot.SteamID)));
|
||||
return bots.Where(static bot => bot.IsConnectedAndLoggedOn).Select(static bot => new Measurement<double>(bot.CardsFarmer.TimeRemaining.TotalMinutes, new KeyValuePair<string, object?>(TagNames.BotName, bot.BotName), new KeyValuePair<string, object?>(TagNames.SteamID, bot.SteamID)));
|
||||
},
|
||||
Units.Minutes,
|
||||
"Approximate number of minutes remaining until each bot has finished farming all cards"
|
||||
|
||||
@@ -305,7 +305,9 @@ public static class PluginsCore {
|
||||
}
|
||||
|
||||
if (activePluginUpdates.Count > 0) {
|
||||
ASF.ArchiLogger.LogGenericWarning(Strings.CustomPluginUpdatesEnabled);
|
||||
if (activePluginUpdates.Any(static plugin => plugin is not OfficialPlugin)) {
|
||||
ASF.ArchiLogger.LogGenericWarning(Strings.CustomPluginUpdatesEnabled);
|
||||
}
|
||||
|
||||
ActivePluginUpdates = activePluginUpdates.ToFrozenSet();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user