Closed windNight closed 4 years ago
感谢pr。。
有几个想和你讨论:
AssertInfo 是否可以用EL表达式功能来断言失败or成功呢? 我觉得 EL表达式更加灵活
if (httpResponse.StatusCode != HttpStatusCode.OK)
{
SendDingTalkNotice(item, context, Strings.QueuenName, $"HttpStatusCode is <font color=#E74C3C> {httpResponse.StatusCode}</font> JobResult is {result}");
logList.Add($"HttpStatusCode is {httpResponse.StatusCode} JobResult is {result}");
}
上面这个可以放到
if (HangfireHttpJobOptions.CheckHttpResponseStatusCode(httpResponse.StatusCode, result))
来判断,这样有的人认为 低于400的算成功,也不一定非要限定是200才算成功
发送钉钉的代码和 SendSuccessMail or SendFailMail 我想抽出合并成一个 通知方法
1、add ExportJobs and ImportJobs to work for migratejobs 2、add TimeZone for every job 3、add DingTalkNotice for every job 4、add AssertInfo for every job