Skip to content

Commit

Permalink
v10.9 重构菜单架构;增强Systemd支持更多参数设置
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Jun 1, 2024
1 parent f2f048f commit 10b0019
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions NewLife.Agent/NewLife.Agent.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Description>应用程序注册为系统服务,支持Windows/Linux</Description>
<Company>新生命开发团队</Company>
<Copyright>©2002-2024 NewLife</Copyright>
<VersionPrefix>10.8</VersionPrefix>
<VersionPrefix>10.9</VersionPrefix>
<VersionSuffix>$([System.DateTime]::Now.ToString(`yyyy.MMdd`))</VersionSuffix>
<Version>$(VersionPrefix).$(VersionSuffix)</Version>
<FileVersion>$(Version)</FileVersion>
Expand All @@ -32,7 +32,7 @@
<RepositoryUrl>https://github.com/NewLifeX/NewLife.Agent</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>新生命团队;X组件;NewLife;$(AssemblyName)</PackageTags>
<PackageReleaseNotes>增强Systemd支持更多参数设置</PackageReleaseNotes>
<PackageReleaseNotes>重构菜单架构;增强Systemd支持更多参数设置</PackageReleaseNotes>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
Expand Down Expand Up @@ -61,7 +61,7 @@
</None>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'!='net40'">
<PackageReference Include="NewLife.Core" Version="10.10.2024.0507" />
<PackageReference Include="NewLife.Core" Version="10.10.2024.0601" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net40'">
<PackageReference Include="NewLife.Core" Version="10.10.2024.0501-net40" />
Expand Down
4 changes: 2 additions & 2 deletions NewLife.Agent/ServiceBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ protected virtual void ProcessMenu()
//输出菜单
ShowMenu();
Console.Write("请输入命令序号:");
Console.WriteLine();
//Console.WriteLine();

//读取命令
var key = Console.ReadKey();
Expand Down Expand Up @@ -216,7 +216,7 @@ protected virtual void ProcessMenu()
XTrace.WriteException(ex);
}
Console.WriteLine();
Thread.Sleep(1000);
//Thread.Sleep(1000);
}
}

Expand Down
4 changes: 2 additions & 2 deletions Test/MyServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public override void StartWork(String reason)
WriteLog("业务开始……");

// 5秒开始,每60秒执行一次
_timer = new TimerX(DoWork, null, 5_000, 60_000) { Async = true };
_timer = new TimerX(DoWork, null, 1_000, 60_000) { Async = true };
// 每天凌晨2点13分执行一次
_timer2 = new TimerX(DoWork, null, DateTime.Today.AddMinutes(2 * 60 + 13), 24 * 3600 * 1000) { Async = true };

Expand All @@ -46,7 +46,7 @@ private void DoWork(Object state)
{
var data = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

//日志会输出到BinTest目录中
// 日志会输出到 Bin/Test 目录中
XTrace.WriteLine($"代码执行时间:{data}");
}

Expand Down
2 changes: 1 addition & 1 deletion TestWorker/TestWorker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<ItemGroup>
<Using Remove="Microsoft.Extensions.Logging" />
<PackageReference Include="NewLife.Stardust.Extensions" Version="2.9.2024.218" />
<PackageReference Include="NewLife.Stardust.Extensions" Version="2.9.2024.402" />
<ProjectReference Include="..\NewLife.Extensions.Hosting.AgentService\NewLife.Extensions.Hosting.AgentService.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Zero.Agent/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public override void StartWork(String reason)
}

private void DoWork1(Object state)
{
{
// 简易型埋点,测量调用次数和耗时,跟内部HttpClient和数据库操作形成上下级调用链,并送往星尘监控中心
using var span = Tracer?.NewSpan("work1");

Expand Down
4 changes: 2 additions & 2 deletions Zero.Agent/Zero.Agent.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NewLife.Stardust" Version="2.9.2024.218" />
<PackageReference Include="NewLife.XCode" Version="11.11.2024.303" />
<PackageReference Include="NewLife.Stardust" Version="2.9.2024.402" />
<PackageReference Include="NewLife.XCode" Version="11.12.2024.515" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Zero.Web/Zero.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NewLife.Cube.Core" Version="6.0.2024.101" />
<PackageReference Include="NewLife.Stardust" Version="2.9.2024.218" />
<PackageReference Include="NewLife.Cube.Core" Version="6.1.2024.403" />
<PackageReference Include="NewLife.Stardust" Version="2.9.2024.402" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 10b0019

Please sign in to comment.