public void Execution()
        {
            if (string.IsNullOrEmpty(SystemConst.AuspiciousIp) || SystemConst.AuspiciousPort == 0)
            {
                LogUtility.SendError("未初始监控吉利端口!!!");
                return;
            }

            var commandLineClient = new MonitorClient(SystemConst.AuspiciousIp, SystemConst.AuspiciousPort);

            commandLineClient.SendDataToProxy(Guid.NewGuid(), 20);
            if (commandLineClient.State == MonitorClientState.Error)
            {
                if (CanNotConnectTime % 5 == 1)
                {
                    SmsUtility.SendAuspiciousError($"中间端连接有异常{DateTime.Now}");
                }
                CanNotConnectTime++;
            }
        }
Beispiel #2
0
 protected void PushCommandToProxy(string transferObject)
 {
     var commandLineClient = new MonitorClient(AuspiciousCache.AuspiciousIp, AuspiciousCache.AuspiciousPort);
     commandLineClient.SendDataToProxy(Guid.NewGuid(), (int)CommandType,
         string.Format("{0}:{1}", RestaurantId, transferObject));
 }