Changed the fingerprinting code for Kavita+. Optimized System tab to be way faster. (#2140)

This commit is contained in:
Joe Milazzo 2023-07-17 18:33:45 -05:00 committed by GitHub
parent 43cc771838
commit 5f505eaf6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 84 additions and 34 deletions

View file

@ -23,6 +23,7 @@ public interface IStatsService
{
Task Send();
Task<ServerInfoDto> GetServerInfo();
Task<ServerInfoSlimDto> GetServerInfoSlim();
Task SendCancellation();
}
/// <summary>
@ -171,6 +172,17 @@ public class StatsService : IStatsService
return serverInfo;
}
public async Task<ServerInfoSlimDto> GetServerInfoSlim()
{
var serverSettings = await _unitOfWork.SettingsRepository.GetSettingsDtoAsync();
return new ServerInfoSlimDto()
{
InstallId = serverSettings.InstallId,
KavitaVersion = serverSettings.InstallVersion,
IsDocker = OsInfo.IsDocker
};
}
public async Task SendCancellation()
{
_logger.LogInformation("Informing KavitaStats that this instance is no longer sending stats");