refactor: 发送云健康检查结果时判断是否开启健康检查
This commit is contained in:
parent
12f63aac31
commit
4172a5a934
|
@ -1,4 +1,5 @@
|
|||
using Microsoft.AspNetCore.Authorization;
|
||||
using Bootstrap.DataAccess;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System.Net.Http;
|
||||
|
@ -26,7 +27,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
{
|
||||
var ret = false;
|
||||
var url = config.GetValue("HealthsCloudUrl", "");
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
if (!string.IsNullOrEmpty(url) && DictHelper.RetrieveHealth())
|
||||
{
|
||||
await httpClient.HttpClient.PostAsJsonAsync(url, message);
|
||||
ret = true;
|
||||
|
|
Loading…
Reference in New Issue