refactor: 发送云健康检查结果时判断是否开启健康检查

This commit is contained in:
Argo Zhang 2020-03-05 21:52:16 +08:00
parent 12f63aac31
commit 4172a5a934
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
1 changed files with 3 additions and 2 deletions

View File

@ -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;