打开文件修改监控
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
24a395f8c8
commit
7a7011e7ef
|
@ -49,8 +49,8 @@ namespace IRaCIS.Core.API
|
||||||
{
|
{
|
||||||
|
|
||||||
//Console.WriteLine(hostContext.HostingEnvironment.EnvironmentName);
|
//Console.WriteLine(hostContext.HostingEnvironment.EnvironmentName);
|
||||||
config.AddJsonFile("appsettings.json", false, false)
|
config.AddJsonFile("appsettings.json", false, true)
|
||||||
.AddJsonFile($"appsettings.{enviromentName}.json", false, false);
|
.AddJsonFile($"appsettings.{enviromentName}.json", false, true);
|
||||||
})
|
})
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,7 @@ namespace IRaCIS.Application.Services.BackGroundJob
|
||||||
|
|
||||||
FileSystemWatcher watcher = new FileSystemWatcher(Path.GetDirectoryName(filePath), Path.GetFileName(filePath));
|
FileSystemWatcher watcher = new FileSystemWatcher(Path.GetDirectoryName(filePath), Path.GetFileName(filePath));
|
||||||
watcher.Changed += (sender, e) => LoadJsonFile(filePath);
|
watcher.Changed += (sender, e) => LoadJsonFile(filePath);
|
||||||
watcher.EnableRaisingEvents = false;
|
watcher.EnableRaisingEvents = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue