不再使用ReloadOnChange开关,默认全部自动探测文件改变

This commit is contained in:
智能大石头 2022-09-16 07:41:07 +08:00
parent 3cbe04ad39
commit 459ef0597c
5 changed files with 9 additions and 9 deletions

View File

@ -57,7 +57,7 @@ namespace StarAgent
Arguments = "newlifex.com",
AutoStart = false,
ReloadOnChange = true,
//ReloadOnChange = true,
};
var si2 = new ServiceInfo
{

View File

@ -370,7 +370,7 @@ public class LocalStarClient
Arguments = arguments,
WorkingDirectory = workingDirectory,
AutoStart = true,
ReloadOnChange = true,
//ReloadOnChange = true,
});
}

View File

@ -129,7 +129,7 @@ internal class ServiceController : DisposeBase
StartTime = DateTime.Now;
// 定时检查文件是否有改变
if (service.ReloadOnChange) StartMonitor();
StartMonitor();
return true;
}
@ -209,7 +209,7 @@ internal class ServiceController : DisposeBase
WriteLog("应用[{0}/{1}]已启动,直接接管", p.Id, Name);
SetProcess(p);
if (Info != null && Info.ReloadOnChange) StartMonitor();
if (Info != null) StartMonitor();
if (StartTime.Year < 2000) StartTime = DateTime.Now;
@ -235,7 +235,7 @@ internal class ServiceController : DisposeBase
WriteLog("应用[{0}/{1}]已启动,直接接管", p.Id, Name);
SetProcess(p);
if (Info != null && Info.ReloadOnChange) StartMonitor();
if (Info != null) StartMonitor();
if (StartTime.Year < 2000) StartTime = DateTime.Now;

View File

@ -244,7 +244,7 @@ public class ServiceManager : DisposeBase
if (svc == null)
{
svc = item;
svc.ReloadOnChange = true;
//svc.ReloadOnChange = true;
svcs.Add(svc);
}

View File

@ -31,9 +31,9 @@ public class ServiceInfo
//[XmlAttribute]
//public Boolean AutoStop { get; set; }
/// <summary>检测文件变动。当文件发生改变时,自动重启应用</summary>
[XmlAttribute]
public Boolean ReloadOnChange { get; set; }
///// <summary>检测文件变动。当文件发生改变时,自动重启应用</summary>
//[XmlAttribute]
//public Boolean ReloadOnChange { get; set; }
/// <summary>最大内存。单位M超过上限时自动重启应用默认0不限制</summary>
[XmlAttribute]