diff --git a/Samples/TestA/TestA.csproj b/Samples/TestA/TestA.csproj index a27d9fdf..454b6e67 100644 --- a/Samples/TestA/TestA.csproj +++ b/Samples/TestA/TestA.csproj @@ -18,7 +18,7 @@ - + diff --git a/Samples/TestB/TestB.csproj b/Samples/TestB/TestB.csproj index ccc10b11..cf022f71 100644 --- a/Samples/TestB/TestB.csproj +++ b/Samples/TestB/TestB.csproj @@ -18,7 +18,7 @@ - + diff --git a/StarAgent/MyStarClient.cs b/StarAgent/MyStarClient.cs index b78cf487..0c4b644f 100644 --- a/StarAgent/MyStarClient.cs +++ b/StarAgent/MyStarClient.cs @@ -90,6 +90,14 @@ protected override void Restart(Upgrade upgrade) var rs = upgrade.Run("StarAgent", "-restart -upgrade"); //!! 这里不需要自杀,外部命令重启服务会结束当前进程 + if (rs) + { + this.WriteInfoEvent("Upgrade", "强制更新完成,新进程已拉起,等待当前服务被重启!"); + } + else + { + this.WriteInfoEvent("Upgrade", "强制更新完成,但拉起新进程失败"); + } } else { diff --git a/StarAgent/Program.cs b/StarAgent/Program.cs index ae08d5af..7367a57d 100644 --- a/StarAgent/Program.cs +++ b/StarAgent/Program.cs @@ -27,15 +27,16 @@ private static void Main(String[] args) #endif XTrace.UseConsole(); + var msWait = 3_000; if ("-upgrade".EqualIgnoreCase(args)) { - XTrace.WriteLine("更新模式启动,等待{0}秒", 5_000); - Thread.Sleep(5_000); + XTrace.WriteLine("更新模式启动,等待{0}秒", msWait); + Thread.Sleep(msWait); } else if ("-delay".EqualIgnoreCase(args)) { - XTrace.WriteLine("延迟启动,等待{0}秒", 5_000); - Thread.Sleep(5_000); + XTrace.WriteLine("延迟启动,等待{0}秒", msWait); + Thread.Sleep(msWait); } var set = StarSetting.Current; diff --git a/StarAgent/StarAgent.csproj b/StarAgent/StarAgent.csproj index 21ef221f..d2127592 100644 --- a/StarAgent/StarAgent.csproj +++ b/StarAgent/StarAgent.csproj @@ -47,7 +47,7 @@ - + diff --git a/Stardust.Server/Stardust.Server.csproj b/Stardust.Server/Stardust.Server.csproj index 1cab7232..300d6732 100644 --- a/Stardust.Server/Stardust.Server.csproj +++ b/Stardust.Server/Stardust.Server.csproj @@ -46,7 +46,7 @@ - + diff --git a/Stardust.Web/Stardust.Web.csproj b/Stardust.Web/Stardust.Web.csproj index 918b0d81..218a6114 100644 --- a/Stardust.Web/Stardust.Web.csproj +++ b/Stardust.Web/Stardust.Web.csproj @@ -53,7 +53,7 @@ - + diff --git a/Stardust/Stardust.csproj b/Stardust/Stardust.csproj index dd96b044..dc515657 100644 --- a/Stardust/Stardust.csproj +++ b/Stardust/Stardust.csproj @@ -117,10 +117,10 @@ - + - + diff --git a/Test/Test.csproj b/Test/Test.csproj index d9f8d38a..f2b3d9a9 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -30,7 +30,7 @@ - +