更新 docker-compose.yml 中的媒体文件路径,移除 JobTriggerController 和 NotifyController 中的未使用代码
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 48s
Docker Build & Deploy / Deploy to Production (push) Successful in 6s

This commit is contained in:
孙诚
2025-09-30 17:17:43 +08:00
parent f93cd5b405
commit a650d4197a
15 changed files with 1 additions and 1535 deletions

View File

@@ -4,34 +4,6 @@ namespace Core;
public static class WxNotify
{
public static async Task SendDiskInfoAsync(string msg)
{
// 晚上11点到早上8点不通知输出到控制台
if (DateTime.Now.Hour >= 23 || DateTime.Now.Hour < 8)
{
Console.WriteLine("======================Skip WxNotify======================");
Console.WriteLine(msg);
Console.WriteLine("======================Skip WxNotify======================");
return;
}
var wxRebotUrl = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=96f9fa23-a959-4492-ac3a-7415fae19680";
var client = new HttpClient();
var requestBody =
"""
{
"msgtype": "markdown",
"markdown": {
"content": "{Msg}"
}
}
""";
// 转义
requestBody = requestBody.Replace("{Msg}", msg.Replace("\r\n", "\n"));
await client.PostAsync(wxRebotUrl, new StringContent(requestBody, Encoding.UTF8, "application/json"));
}
public static async Task SendCommonAsync(string msg)
{
var wxRebotUrl = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=96f9fa23-a959-4492-ac3a-7415fae19680";