public ReadOnlyCalcConfigSet(ICalcConfigDataRedis redis) { _redis = redis; VirtualRoot.BuildEventPath <Per10MinuteEvent>("周期从redis加载收益计算器配置数据", LogEnum.DevConsole, typeof(ReadOnlyCalcConfigSet), PathPriority.Normal, message => { Load(); }); VirtualRoot.BuildEventPath <CalcConfigsUpdatedMqEvent>("收到CalcConfigsUpdated Mq消息后从redis加载数据刷新内存中的收益计算器数据集", LogEnum.DevConsole, typeof(ReadOnlyCalcConfigSet), PathPriority.Normal, message => { Load(); }); Load().ContinueWith(t => { VirtualRoot.RaiseEvent(new CalcConfigSetInitedEvent()); }); }
public CalcConfigSet(ICalcConfigDataRedis redis, ICalcConfigMqSender mqSender) : base(redis) { _mqSender = mqSender; }