This commit is contained in:
“wanyongkang”
2020-12-28 14:55:48 +08:00
parent c2ec7392cb
commit 40a40b6d36
305 changed files with 20629 additions and 20629 deletions

View File

@@ -1,35 +1,35 @@
using System;
using System.Threading.Tasks;
using Hncore.Infrastructure.Common;
using Hncore.Infrastructure.Common.DingTalk;
using Hncore.Infrastructure.Extension;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Hncore.Infrastructure.WebApi
{
[Route("/pod/[action]")]
public class PodHookController : ControllerBase
{
[HttpGet, AllowAnonymous]
public async Task<IActionResult> PreStop()
{
LogHelper.Warn("应用即将退出");
if (EnvironmentVariableHelper.IsAspNetCoreProduction)
{
await DingTalkHelper.SendMessage(new MarkDownModel()
{
markdown = new markdown()
{
title = "应用即将退出",
text = "### 应用即将退出\n\nhostname" + EnvironmentVariableHelper.HostName + "\n\n" +
DateTime.Now.Format("yyyy-MM-dd HH:mm:ss")
}
});
}
return Ok();
}
}
using System;
using System.Threading.Tasks;
using Hncore.Infrastructure.Common;
using Hncore.Infrastructure.Common.DingTalk;
using Hncore.Infrastructure.Extension;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Hncore.Infrastructure.WebApi
{
[Route("/pod/[action]")]
public class PodHookController : ControllerBase
{
[HttpGet, AllowAnonymous]
public async Task<IActionResult> PreStop()
{
LogHelper.Warn("应用即将退出");
if (EnvironmentVariableHelper.IsAspNetCoreProduction)
{
await DingTalkHelper.SendMessage(new MarkDownModel()
{
markdown = new markdown()
{
title = "应用即将退出",
text = "### 应用即将退出\n\nhostname" + EnvironmentVariableHelper.HostName + "\n\n" +
DateTime.Now.Format("yyyy-MM-dd HH:mm:ss")
}
});
}
return Ok();
}
}
}