Ejemplo n.º 1
0
        // Token: 0x060005EF RID: 1519 RVA: 0x00023680 File Offset: 0x00021880
        public void UpdateEngineThrottleInfo()
        {
            List <string> list = new List <string>();

            list.Add("Total Weight");
            list.Add("Scale Factor");
            try
            {
                List <EngineProperty> list2 = new List <EngineProperty>();
                list2.Add(new EngineProperty("Total Job Weight", "Total Weight", this._throttlingStatusProvider.GetTotalJobWeight().ToString()));
                foreach (KeyValuePair <string, int> keyValuePair in this._throttlingStatusProvider.GetScaleFactors())
                {
                    list2.Add(new EngineProperty(keyValuePair.Key, "Scale Factor", keyValuePair.Value.ToString()));
                }
                try
                {
                    list2.Add(new EngineProperty("Scale Licenses", "Scale Licenses", this.GetStackablePollersCount().ToString()));
                    list.Add("Scale Licenses");
                }
                catch (Exception ex)
                {
                    MasterEngineInitiator.log.Error("Can't load stackable poller licenses", ex);
                }
                EngineDAL.UpdateEngineProperties(base.EngineID, list2, list.ToArray());
            }
            catch (Exception ex2)
            {
                if (base.ThrowExceptions)
                {
                    throw;
                }
                MasterEngineInitiator.log.Error(ex2);
            }
        }
Ejemplo n.º 2
0
        public void UpdateEngineThrottleInfo()
        {
            List <string> stringList = new List <string>();

            stringList.Add("Total Weight");
            stringList.Add("Scale Factor");
            try
            {
                List <EngineProperty> enginePropertyList = new List <EngineProperty>();
                int totalJobWeight = this._throttlingStatusProvider.GetTotalJobWeight();
                enginePropertyList.Add(new EngineProperty("Total Job Weight", "Total Weight", totalJobWeight.ToString()));
                foreach (KeyValuePair <string, int> scaleFactor in this._throttlingStatusProvider.GetScaleFactors())
                {
                    enginePropertyList.Add(new EngineProperty(scaleFactor.Key, "Scale Factor", scaleFactor.Value.ToString()));
                }
                try
                {
                    enginePropertyList.Add(new EngineProperty("Scale Licenses", "Scale Licenses", this.GetStackablePollersCount().ToString()));
                    stringList.Add("Scale Licenses");
                }
                catch (Exception ex)
                {
                    MasterEngineInitiator.log.Error((object)"Can't load stackable poller licenses", ex);
                }
                EngineDAL.UpdateEngineProperties(this.get_EngineID(), (IEnumerable <EngineProperty>)enginePropertyList, stringList.ToArray());
            }
            catch (Exception ex)
            {
                if (this.get_ThrowExceptions())
                {
                    throw;
                }
                else
                {
                    MasterEngineInitiator.log.Error((object)ex);
                }
            }
        }