Skip to content

Commit

Permalink
[fix]升级核心库,修正StartTime为0的问题;StarAgent自动更新时可能失败,记录详情。
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Nov 17, 2024
1 parent 41b676c commit 3b276eb
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Samples/TestA/TestA.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NewLife.Core" Version="11.0.2024.1113" />
<PackageReference Include="NewLife.Core" Version="11.0.2024.1115" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Samples/TestB/TestB.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NewLife.Core" Version="11.0.2024.1113" />
<PackageReference Include="NewLife.Core" Version="11.0.2024.1115" />
</ItemGroup>

</Project>
8 changes: 8 additions & 0 deletions StarAgent/MyStarClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
9 changes: 5 additions & 4 deletions StarAgent/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion StarAgent/StarAgent.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NewLife.Agent" Version="10.10.2024.1113" />
<PackageReference Include="NewLife.Agent" Version="10.10.2024.1116" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Stardust.Server/Stardust.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<ItemGroup>
<PackageReference Include="NewLife.IP" Version="2.2.2024.1102" />
<PackageReference Include="NewLife.Redis" Version="6.0.2024.1101" />
<PackageReference Include="NewLife.Remoting.Extensions" Version="3.2.2024.1113" />
<PackageReference Include="NewLife.Remoting.Extensions" Version="3.2.2024.1116" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Stardust.Web/Stardust.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<PackageReference Include="NewLife.Cube.Core" Version="6.2.2024.1115" />
<PackageReference Include="NewLife.IP" Version="2.2.2024.1102" />
<PackageReference Include="NewLife.Redis" Version="6.0.2024.1101" />
<PackageReference Include="NewLife.Remoting.Extensions" Version="3.2.2024.1113" />
<PackageReference Include="NewLife.Remoting.Extensions" Version="3.2.2024.1116" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Stardust/Stardust.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NewLife.Remoting" Version="3.2.2024.1113" />
<PackageReference Include="NewLife.Remoting" Version="3.2.2024.1116" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NewLife.Core" Version="11.0.2024.1113" />
<PackageReference Include="NewLife.Core" Version="11.0.2024.1115" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Test/Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="9.0.0" />
<PackageReference Include="NewLife.Core" Version="11.0.2024.1113" />
<PackageReference Include="NewLife.Core" Version="11.0.2024.1115" />
<PackageReference Include="SSH.NET" Version="2024.2.0" />
</ItemGroup>

Expand Down

0 comments on commit 3b276eb

Please sign in to comment.