private static bool QueryException() { var flag = true; try { var result = QueryExceptionService.ServiceTimeout(); if (result == -1) { MessageHelper.SendExpMsg($"请求ICAS服务器无响应 ..."); } else if (result > 3000) { MessageHelper.SendExpMsg($"服务器响应时间{result},已经超出接受范围"); } else if (result > 10000) { MessageHelper.SendExpMsg($"服务器响应时间{result},已经严重影响业务"); } else { LogHelper.Info($"ICAS服务器响应时间{result}"); } } catch (Exception e) { LogHelper.Error("Task Exception", e); flag = false; } return(flag); }
public ActionResult CheckServiceMsg() { var result = QueryExceptionService.ServiceTimeout(); if (result == -1) { MessageHelper.SendExpMsg($"请求ICAS服务器无响应 ..."); } else if (result > 3000) { MessageHelper.SendExpMsg($"服务器响应时间{result},已经超出接受范围"); } else if (result > 10000) { MessageHelper.SendExpMsg($"服务器响应时间{result},已经严重影响业务"); } else { MessageHelper.SendExpMsg($"ICAS服务器响应时间{result}"); } return(Json(new { code = 0, msg = result }, JsonRequestBehavior.AllowGet)); }
public void SimpleTest() { var time = QueryExceptionService.ServiceTimeout(); }