Speedup Stats endpoint call X3

This commit is contained in:
Qstick
2021-12-04 17:24:20 -06:00
parent 89e500edfd
commit dcee9582bd

View File

@@ -21,11 +21,13 @@ namespace Prowlarr.Api.V1.Indexers
var statsStartDate = startDate ?? DateTime.MinValue; var statsStartDate = startDate ?? DateTime.MinValue;
var statsEndDate = endDate ?? DateTime.Now; var statsEndDate = endDate ?? DateTime.Now;
var indexerStats = _indexerStatisticsService.IndexerStatistics(statsStartDate, statsEndDate);
var indexerResource = new IndexerStatsResource var indexerResource = new IndexerStatsResource
{ {
Indexers = _indexerStatisticsService.IndexerStatistics(statsStartDate, statsEndDate).IndexerStatistics, Indexers = indexerStats.IndexerStatistics,
UserAgents = _indexerStatisticsService.IndexerStatistics(statsStartDate, statsEndDate).UserAgentStatistics, UserAgents = indexerStats.UserAgentStatistics,
Hosts = _indexerStatisticsService.IndexerStatistics(statsStartDate, statsEndDate).HostStatistics Hosts = indexerStats.HostStatistics
}; };
return indexerResource; return indexerResource;