Compare commits
No commits in common. "b5e608cf94a35c35ca034261fa17a4987887f413" and "4cc1f472e9f0058112d8498352e339ffaa4ba92e" have entirely different histories.
b5e608cf94
...
4cc1f472e9
|
|
@ -445,7 +445,6 @@ public class ExamManager : DomainService, IExamManager
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Logger.LogError("{ExamSubjectId} {penSerial} 收集失败! {error}", eto.ExamSubjectId, penSerial, ex);
|
Logger.LogError("{ExamSubjectId} {penSerial} 收集失败! {error}", eto.ExamSubjectId, penSerial, ex);
|
||||||
await NotifyExt.DingTalk($"{eto.ExamSubjectId} {penSerial} 收集失败! 异常:{ex.Message}");
|
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
using Dolphin.ExamPictureCut.Exams;
|
using Dolphin.ExamPictureCut.Exams;
|
||||||
using Dolphin.ExamPictureCut.Extensions;
|
|
||||||
|
|
||||||
namespace Dolphin.ExamPictureCut.Services;
|
namespace Dolphin.ExamPictureCut.Services;
|
||||||
|
|
||||||
|
|
@ -15,9 +14,4 @@ public class ExamAppService : DolphinAppService
|
||||||
{
|
{
|
||||||
await _examManager.ExamStudentGather(new() { SchoolId = 3, StudentExamNum = "BP2-3G3-07K-C1", BookId = 529493484986437, ExamSubjectSchoolId = 530151338438726, ExamSubjectId = 530151329325125, LastCollectTime = DateTime.Now });
|
await _examManager.ExamStudentGather(new() { SchoolId = 3, StudentExamNum = "BP2-3G3-07K-C1", BookId = 529493484986437, ExamSubjectSchoolId = 530151338438726, ExamSubjectId = 530151329325125, LastCollectTime = DateTime.Now });
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task NotifyTest()
|
|
||||||
{
|
|
||||||
await NotifyExt.DingTalk($"{530151329325125} {"BP2-3G3-07K-C1"} 收集失败! 异常: {"通知测试"}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
using Flurl.Http;
|
|
||||||
|
|
||||||
namespace Dolphin.ExamPictureCut.Extensions;
|
|
||||||
|
|
||||||
public class NotifyExt
|
|
||||||
{
|
|
||||||
public static async Task DingTalk(string text)
|
|
||||||
{
|
|
||||||
await "https://oapi.dingtalk.com/robot/send?access_token=6ddafcada8f44f4bad4a7314c4d9bd19a895ded0a1ba1afdaff5dd01a5af6781".PostJsonAsync(new
|
|
||||||
{
|
|
||||||
msgtype = "markdown",
|
|
||||||
markdown = new
|
|
||||||
{
|
|
||||||
title = "异常通知",
|
|
||||||
text = $"dotpan,{Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT")}异常\n > 来源:Dplphin.ExamPictureCut\n > 详情:" + text,
|
|
||||||
}
|
|
||||||
}).ReceiveString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue