不再使用ReloadOnChange开关,默认全部自动探测文件改变
This commit is contained in:
parent
3cbe04ad39
commit
459ef0597c
|
@ -57,7 +57,7 @@ namespace StarAgent
|
|||
Arguments = "newlifex.com",
|
||||
|
||||
AutoStart = false,
|
||||
ReloadOnChange = true,
|
||||
//ReloadOnChange = true,
|
||||
};
|
||||
var si2 = new ServiceInfo
|
||||
{
|
||||
|
|
|
@ -370,7 +370,7 @@ public class LocalStarClient
|
|||
Arguments = arguments,
|
||||
WorkingDirectory = workingDirectory,
|
||||
AutoStart = true,
|
||||
ReloadOnChange = true,
|
||||
//ReloadOnChange = true,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ public class ServiceManager : DisposeBase
|
|||
if (svc == null)
|
||||
{
|
||||
svc = item;
|
||||
svc.ReloadOnChange = true;
|
||||
//svc.ReloadOnChange = true;
|
||||
|
||||
svcs.Add(svc);
|
||||
}
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue