refactor: 健康检查移除缓存

This commit is contained in:
Argo-Tianyi 2022-01-14 23:36:05 +08:00
parent d60bdd3bc8
commit b6cd8ddcdd
1 changed files with 2 additions and 9 deletions

View File

@ -1,11 +1,7 @@
using Bootstrap.Security.Blazor.HealthChecks;
using BootstrapAdmin.Web.Components;
using BootstrapAdmin.Web.Services;
using BootstrapAdmin.Web.Utils;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace BootstrapAdmin.Web.Pages.Admin;
@ -53,11 +49,8 @@ public partial class Healths
private async Task<QueryData<HealthCheckReportItem>> OnQueryAsync(QueryPageOptions options)
{
var report = await CacheManager.GetOrAddAsync("Health", async entry =>
{
var payload = await Client.GetStringAsync("/Healths");
return HealthCheckHelper.Parse(payload);
});
var payload = await Client.GetStringAsync("/Healths");
var report = HealthCheckHelper.Parse(payload);
var ret = new QueryData<HealthCheckReportItem>()
{