Skip to content

Commit

Permalink
Merge branch 'master' into business
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Oct 29, 2024
2 parents eac5b1b + 09c0217 commit d415bb2
Show file tree
Hide file tree
Showing 105 changed files with 3,355 additions and 2,875 deletions.
27 changes: 16 additions & 11 deletions .github/workflows/publish-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,32 @@ on:
paths:
- 'AntJob/**'
- 'AntJob.Extensions/**'
pull_request:
branches: [ master ]
paths:
- 'AntJob/**'
- 'AntJob.Extensions/**'
workflow_dispatch:

jobs:
build-publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
- uses: actions/checkout@v4
- name: Setup dotNET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore
run: |
dotnet restore AntJob/AntJob.csproj
dotnet restore AntJob.Extensions/AntJob.Extensions.csproj
dotnet-version: |
6.0.x
7.0.x
8.x
- name: Get Version
run: echo "VERSION=$(date '+%Y.%m%d-beta%H%M')" >> $GITHUB_ENV
- name: Build
run: |
dotnet pack --no-restore --version-suffix $(date "+%Y.%m%d-beta%H%M") -c Release -o out AntJob/AntJob.csproj
dotnet pack --no-restore --version-suffix $(date "+%Y.%m%d-beta%H%M") -c Release -o out AntJob.Extensions/AntJob.Extensions.csproj
dotnet pack --version-suffix ${{ env.VERSION }} -c Release -o out AntJob/AntJob.csproj
dotnet pack --version-suffix ${{ env.VERSION }} -c Release -o out AntJob.Extensions/AntJob.Extensions.csproj
- name: Publish
run: |
dotnet nuget push ./out/*.nupkg --skip-duplicate --source https://nuget.pkg.github.com/NewLifeX/index.json --api-key ${{ github.token }}
Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,25 @@ on:

jobs:
build-publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
- uses: actions/checkout@v4
- name: Setup dotNET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore
run: |
dotnet restore AntJob/AntJob.csproj
dotnet restore AntJob.Extensions/AntJob.Extensions.csproj
dotnet-version: |
6.0.x
7.0.x
8.x
- name: Get Version
run: echo "VERSION=$(date '+%Y.%m%d')" >> $GITHUB_ENV
- name: Build
run: |
dotnet pack --no-restore --version-suffix $(date "+%Y.%m%d") -c Release -o out AntJob/AntJob.csproj
dotnet pack --no-restore --version-suffix $(date "+%Y.%m%d") -c Release -o out AntJob.Extensions/AntJob.Extensions.csproj
dotnet pack --version-suffix ${{ env.VERSION }} -c Release -o out AntJob/AntJob.csproj
dotnet pack --version-suffix ${{ env.VERSION }} -c Release -o out AntJob.Extensions/AntJob.Extensions.csproj
dotnet pack --version-suffix ${{ env.VERSION }} -c Release -o out AntJob.Data/AntJob.Data.csproj
dotnet pack --version-suffix ${{ env.VERSION }} -c Release -o out AntWeb/AntWeb.csproj
- name: Publish
run: |
dotnet nuget push ./out/*.nupkg --skip-duplicate --source https://nuget.pkg.github.com/NewLifeX/index.json --api-key ${{ github.token }}
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ on:

jobs:
build-publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
- uses: actions/checkout@v4
- name: Setup dotNET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: |
6.0.x
7.0.x
8.x
- name: Build
run: |
dotnet build -c Release
Expand Down
2 changes: 1 addition & 1 deletion AntJob.Agent/AntJob.Agent.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NewLife.Stardust" Version="2.9.2024.402" />
<PackageReference Include="NewLife.Stardust" Version="3.1.2024.1004" />
</ItemGroup>

<ItemGroup>
Expand Down
15 changes: 3 additions & 12 deletions AntJob.Agent/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using AntJob;
using AntJob.Extensions;
using AntJob.Providers;
using NewLife.Log;
using NewLife.Model;
using Stardust;
Expand All @@ -17,26 +16,18 @@
var scheduler = new Scheduler
{
ServiceProvider = services.BuildServiceProvider(),

//// 使用分布式调度引擎替换默认的本地文件调度
//Provider = new NetworkJobProvider
//{
// Debug = set.Debug,
// Server = set.Server,
// AppID = set.AppID,
// Secret = set.Secret,
//}
Log = XTrace.Log,
};

scheduler.Join(set.Server, set.AppID, set.Secret, set.Debug);
scheduler.Join(set);

// 添加作业处理器
//sc.Handlers.Add(new CSharpHandler());
scheduler.AddHandler<SqlHandler>();
scheduler.AddHandler<SqlMessage>();

// 启动调度引擎,调度器内部多线程处理
scheduler.Start();
scheduler.StartAsync();

// 友好退出
var host = services.BuildHost();
Expand Down
Loading

0 comments on commit d415bb2

Please sign in to comment.