public void Run(object o) { while (true) { if (!_nodeInfo.HaveAcessRight) { break; } if (!PureCat.IsInitialized()) { Thread.Sleep(5000); continue; } PureCat.DoTransaction("System", "Status", () => { _nodeInfo.Refresh(); PureCat.LogHeartbeat("Heartbeat", AppEnv.IP, PureCatConstants.SUCCESS, XmlHelper.XmlSerialize(_nodeInfo, Encoding.UTF8)); PureCat.LogEvent("System", $"Cat.Version : {PureCat.Version}", PureCatConstants.SUCCESS, PureCat.Version); }); Thread.Sleep(60000); } }
internal Context GetContext() { if (PureCat.IsInitialized()) { Context ctx = _mContext.Value; if (ctx != null) { return ctx; } } return null; }