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); } }
internal Context GetContext() { if (PureCatClient.IsInitialized()) { var ctx = _mContext.Value; if (ctx != null) { return(ctx); } } return(null); }