Browse Source
Add TickerQ dashboard integration to demo app
pull/23802/head
maliming
4 months ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
5 changed files with
27 additions and
3 deletions
-
.github/workflows/build-and-test.yml
-
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.TickerQ/DemoAppTickerQModule.cs
-
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.TickerQ/Program.cs
-
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.TickerQ/Properties/launchSettings.json
-
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.TickerQ/Volo.Abp.BackgroundJobs.DemoApp.TickerQ.csproj
|
|
|
@ -52,6 +52,9 @@ jobs: |
|
|
|
if: ${{ !github.event.pull_request.draft }} |
|
|
|
steps: |
|
|
|
- uses: jlumbroso/free-disk-space@main |
|
|
|
- uses: PSModule/install-powershell@v1 |
|
|
|
with: |
|
|
|
Version: latest |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
- uses: actions/setup-dotnet@master |
|
|
|
with: |
|
|
|
|
|
|
|
@ -1,8 +1,8 @@ |
|
|
|
using System; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.AspNetCore.Builder; |
|
|
|
using Microsoft.AspNetCore.Http; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using TickerQ.Dashboard.DependencyInjection; |
|
|
|
using TickerQ.DependencyInjection; |
|
|
|
using TickerQ.Utilities.Interfaces.Managers; |
|
|
|
using TickerQ.Utilities.Models.Ticker; |
|
|
|
@ -31,6 +31,13 @@ public class DemoAppTickerQModule : AbpModule |
|
|
|
context.Services.AddTickerQ(options => |
|
|
|
{ |
|
|
|
options.UpdateMissedJobCheckDelay(TimeSpan.FromSeconds(30)); |
|
|
|
|
|
|
|
options.AddDashboard(x => |
|
|
|
{ |
|
|
|
x.BasePath = "/tickerq-dashboard"; |
|
|
|
|
|
|
|
x.UseHostAuthentication = true; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
Configure<AbpBackgroundJobsTickerQOptions>(options => |
|
|
|
@ -62,7 +69,7 @@ public class DemoAppTickerQModule : AbpModule |
|
|
|
{ |
|
|
|
endpoints.MapGet("/", async httpContext => |
|
|
|
{ |
|
|
|
await httpContext.Response.WriteAsync("Hello TickerQ!"); |
|
|
|
httpContext.Response.Redirect("/tickerq-dashboard", true); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
@ -10,7 +10,7 @@ public class Program |
|
|
|
public static async Task Main(string[] args) |
|
|
|
{ |
|
|
|
var builder = WebApplication.CreateBuilder(args); |
|
|
|
builder.Host.AddAppSettingsSecretsJson().UseAutofac(); |
|
|
|
builder.Host.UseAutofac(); |
|
|
|
await builder.AddApplicationAsync<DemoAppTickerQModule>(); |
|
|
|
var app = builder.Build(); |
|
|
|
await app.InitializeApplicationAsync(); |
|
|
|
|
|
|
|
@ -0,0 +1,13 @@ |
|
|
|
{ |
|
|
|
"$schema": "http://json.schemastore.org/launchsettings.json", |
|
|
|
"profiles": { |
|
|
|
"Volo.Abp.BackgroundJobs.DemoApp.TickerQ": { |
|
|
|
"commandName": "Project", |
|
|
|
"launchBrowser": true, |
|
|
|
"applicationUrl": "https://localhost:5000", |
|
|
|
"environmentVariables": { |
|
|
|
"ASPNETCORE_ENVIRONMENT": "Development" |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -11,6 +11,7 @@ |
|
|
|
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.BackgroundWorkers.TickerQ\Volo.Abp.BackgroundWorkers.TickerQ.csproj" /> |
|
|
|
<ProjectReference Include="..\Volo.Abp.BackgroundJobs.DemoApp.Shared\Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj" /> |
|
|
|
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore\Volo.Abp.AspNetCore.csproj" /> |
|
|
|
<PackageReference Include="TickerQ.Dashboard" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|