Пример #1
0
        public void Run(object o)
        {
            while (true)
            {
                if (!_nodeInfo.HaveAcessRight)
                {
                    break;
                }

                if (!PureCatClient.IsInitialized())
                {
                    Thread.Sleep(5000);
                    continue;
                }

                PureCatClient.DoTransaction("System", "Status", () =>
                {
                    _nodeInfo.Refresh();
                    PureCatClient.GetProducer().LogHeartbeat("Heartbeat", AppEnv.IP, PureCatConstants.SUCCESS, XmlHelper.XmlSerialize(_nodeInfo, Encoding.UTF8));
                    PureCatClient.GetProducer().LogEvent("System", $"PureCat.Version : {PureCatClient.Version}", PureCatConstants.SUCCESS, PureCatClient.Version);
                });

                Thread.Sleep(60000);
            }
        }
Пример #2
0
        public ITransaction AddChild(IMessage message)
        {
            if (_mChildren == null)
            {
                _mChildren = new List <IMessage>();
            }

            if (message != null)
            {
                _mChildren.Add(message);
            }
            else
            {
                PureCatClient.GetProducer().LogError(new Exception("null child message"));
            }
            return(this);
        }