public override async Task Execute(IJobExecutionContext context)
        {
            try
            {
                ConsulNetClient consulClient = new ConsulNetClient(new ConsulOption()
                {
                    Host       = ConHost,
                    DataCenter = ConDataCenter,
                    WaitTime   = TimeSpan.FromSeconds(ConWaitTime),
                    TimeOut    = TimeSpan.FromSeconds(ConTimeOut)
                });
                // LogService.Default.Debug("xxxx-xxx-1");
                //获取配置信息
                var conList = await consulClient.KVListAsync <ConfigValue>(ConPath);

                // LogService.Default.Debug("xxxx-xxx-2");

                var valueList = conList.Where(o => o.IsEnable).ToList();
                //  LogService.Default.Debug("xxxx-xxx-3");

                //同步配置信息
                JsonConfigMange.GetInstance().WiteConfig(valueList);

                //释放Concul连接
                consulClient.Dispose();
            }
            catch (Exception ex)
            {
                LogService.Default.Fatal(ex, "执行后台任务拉取配置信息出错" + ex.Message);
            }
        }
 public static JsonConfigMange GetInstance()
 {
     lock (locker)//确保线程安全
     {
         if (_configManage == null)
         {
             _configManage = new JsonConfigMange();
             _configManage.configOperat = new ConfigurationBuilder()
                                          .AddInMemoryCollection()
                                          .SetBasePath(Directory.GetCurrentDirectory())
                                          .AddJsonFile(_configManage.jsonFileName, optional: true, reloadOnChange: true)
                                          .Build();
         }
         return(_configManage);
     }
 }