Browse Source

Merge pull request #459 from colinin/task-exception-handling

feat(tasks): add job execute exception handler
pull/474/head
yx lin 4 years ago
committed by GitHub
parent
commit
19d58199ae
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      apps/vue/src/views/task-management/background-jobs/components/BackgroundJobInfoTable.vue
  2. 7
      aspnet-core/LINGYUN.MicroService.TaskManagement.sln
  3. 9
      aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Abstractions/LINGYUN/Abp/BackgroundTasks/IJobExceptionNotifier.cs
  4. 16
      aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Abstractions/LINGYUN/Abp/BackgroundTasks/JobExceptionNotificationContext.cs
  5. 2
      aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Abstractions/LINGYUN/Abp/BackgroundTasks/JobRunnableContextExtensions.cs
  6. 14
      aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Abstractions/LINGYUN/Abp/BackgroundTasks/NullJobExceptionNotifier.cs
  7. 3
      aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.ExceptionHandling/FodyWeavers.xml
  8. 30
      aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.ExceptionHandling/FodyWeavers.xsd
  9. 21
      aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.ExceptionHandling/LINGYUN.Abp.BackgroundTasks.ExceptionHandling.csproj
  10. 10
      aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.ExceptionHandling/LINGYUN/Abp/BackgroundTasks/ExceptionHandling/AbpBackgroundTasksExceptionHandlingModule.cs
  11. 76
      aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.ExceptionHandling/LINGYUN/Abp/BackgroundTasks/ExceptionHandling/JobExceptionNotifier.cs
  12. 4
      aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/FodyWeavers.xml
  13. 58
      aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/SendEmailJob.cs
  14. 20
      aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/Internal/JobExecutedEvent.cs
  15. 1
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/LY.MicroService.TaskManagement.HttpApi.Host.csproj
  16. 2
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.cs

4
apps/vue/src/views/task-management/background-jobs/components/BackgroundJobInfoTable.vue

@ -131,24 +131,28 @@
function handlePause(record) { function handlePause(record) {
pause(record.id).then(() => { pause(record.id).then(() => {
message.success(L('Successful')); message.success(L('Successful'));
reload();
}); });
} }
function handleResume(record) { function handleResume(record) {
resume(record.id).then(() => { resume(record.id).then(() => {
message.success(L('Successful')); message.success(L('Successful'));
reload();
}); });
} }
function handleTrigger(record) { function handleTrigger(record) {
trigger(record.id).then(() => { trigger(record.id).then(() => {
message.success(L('Successful')); message.success(L('Successful'));
reload();
}); });
} }
function handleStop(record) { function handleStop(record) {
stop(record.id).then(() => { stop(record.id).then(() => {
message.success(L('Successful')); message.success(L('Successful'));
reload();
}); });
} }

7
aspnet-core/LINGYUN.MicroService.TaskManagement.sln

@ -38,6 +38,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.BackgroundTasks
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.BackgroundTasks.Jobs", "modules\task-management\LINGYUN.Abp.BackgroundTasks.Jobs\LINGYUN.Abp.BackgroundTasks.Jobs.csproj", "{4C59F590-AA6C-4C46-8060-DA65D8305980}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.BackgroundTasks.Jobs", "modules\task-management\LINGYUN.Abp.BackgroundTasks.Jobs\LINGYUN.Abp.BackgroundTasks.Jobs.csproj", "{4C59F590-AA6C-4C46-8060-DA65D8305980}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.BackgroundTasks.ExceptionHandling", "modules\task-management\LINGYUN.Abp.BackgroundTasks.ExceptionHandling\LINGYUN.Abp.BackgroundTasks.ExceptionHandling.csproj", "{8507BBFA-FE56-4426-BBFA-C92906CB8407}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -88,6 +90,10 @@ Global
{4C59F590-AA6C-4C46-8060-DA65D8305980}.Debug|Any CPU.Build.0 = Debug|Any CPU {4C59F590-AA6C-4C46-8060-DA65D8305980}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C59F590-AA6C-4C46-8060-DA65D8305980}.Release|Any CPU.ActiveCfg = Release|Any CPU {4C59F590-AA6C-4C46-8060-DA65D8305980}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C59F590-AA6C-4C46-8060-DA65D8305980}.Release|Any CPU.Build.0 = Release|Any CPU {4C59F590-AA6C-4C46-8060-DA65D8305980}.Release|Any CPU.Build.0 = Release|Any CPU
{8507BBFA-FE56-4426-BBFA-C92906CB8407}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8507BBFA-FE56-4426-BBFA-C92906CB8407}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8507BBFA-FE56-4426-BBFA-C92906CB8407}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8507BBFA-FE56-4426-BBFA-C92906CB8407}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -104,6 +110,7 @@ Global
{E8022994-A19F-4540-B9D1-7EF4AA85D18A} = {8DA8A2EE-0B26-487E-A6C4-518906E92B1B} {E8022994-A19F-4540-B9D1-7EF4AA85D18A} = {8DA8A2EE-0B26-487E-A6C4-518906E92B1B}
{4A049C32-55F2-4A5F-954A-C8A977C2D87F} = {C38EB7EF-BAE9-4129-862A-71C652B81775} {4A049C32-55F2-4A5F-954A-C8A977C2D87F} = {C38EB7EF-BAE9-4129-862A-71C652B81775}
{4C59F590-AA6C-4C46-8060-DA65D8305980} = {C38EB7EF-BAE9-4129-862A-71C652B81775} {4C59F590-AA6C-4C46-8060-DA65D8305980} = {C38EB7EF-BAE9-4129-862A-71C652B81775}
{8507BBFA-FE56-4426-BBFA-C92906CB8407} = {C38EB7EF-BAE9-4129-862A-71C652B81775}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E1FD1F4C-D344-408B-97CF-B6F1F6D7D293} SolutionGuid = {E1FD1F4C-D344-408B-97CF-B6F1F6D7D293}

9
aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Abstractions/LINGYUN/Abp/BackgroundTasks/IJobExceptionNotifier.cs

@ -0,0 +1,9 @@
using JetBrains.Annotations;
using System.Threading.Tasks;
namespace LINGYUN.Abp.BackgroundTasks;
public interface IJobExceptionNotifier
{
Task NotifyAsync([NotNull] JobExceptionNotificationContext context);
}

16
aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Abstractions/LINGYUN/Abp/BackgroundTasks/JobExceptionNotificationContext.cs

@ -0,0 +1,16 @@
using System;
namespace LINGYUN.Abp.BackgroundTasks;
public class JobExceptionNotificationContext
{
public JobInfo JobInfo { get; }
public Exception Exception { get; }
public JobExceptionNotificationContext(
JobInfo jobInfo,
Exception exception)
{
JobInfo = jobInfo;
Exception = exception;
}
}

2
aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Abstractions/LINGYUN/Abp/BackgroundTasks/JobRunnableContextExtensions.cs

@ -71,7 +71,7 @@ public static class JobRunnableContextExtensions
{ {
return value; return value;
} }
throw new ArgumentException(key + " not specified."); throw new ArgumentException($"Job required data {key} not specified.");
} }
public static bool TryGetJobData(this JobRunnableContext context, string key, out object value) public static bool TryGetJobData(this JobRunnableContext context, string key, out object value)

14
aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Abstractions/LINGYUN/Abp/BackgroundTasks/NullJobExceptionNotifier.cs

@ -0,0 +1,14 @@
using JetBrains.Annotations;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
namespace LINGYUN.Abp.BackgroundTasks;
[Dependency(TryRegister = true)]
public class NullJobExceptionNotifier : IJobExceptionNotifier, ISingletonDependency
{
public Task NotifyAsync([NotNull] JobExceptionNotificationContext context)
{
return Task.CompletedTask;
}
}

3
aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.ExceptionHandling/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.ExceptionHandling/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

21
aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.ExceptionHandling/LINGYUN.Abp.BackgroundTasks.ExceptionHandling.csproj

@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Timing" Version="$(VoloAbpPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\common\LINGYUN.Abp.ExceptionHandling\LINGYUN.Abp.ExceptionHandling.csproj" />
<ProjectReference Include="..\LINGYUN.Abp.BackgroundTasks.Jobs\LINGYUN.Abp.BackgroundTasks.Jobs.csproj" />
<ProjectReference Include="..\LINGYUN.Abp.BackgroundTasks\LINGYUN.Abp.BackgroundTasks.csproj" />
</ItemGroup>
</Project>

10
aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.ExceptionHandling/LINGYUN/Abp/BackgroundTasks/ExceptionHandling/AbpBackgroundTasksExceptionHandlingModule.cs

@ -0,0 +1,10 @@
using LINGYUN.Abp.ExceptionHandling;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.BackgroundTasks.ExceptionHandling;
[DependsOn(typeof(AbpExceptionHandlingModule))]
public class AbpBackgroundTasksExceptionHandlingModule : AbpModule
{
}

76
aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.ExceptionHandling/LINGYUN/Abp/BackgroundTasks/ExceptionHandling/JobExceptionNotifier.cs

@ -0,0 +1,76 @@
using JetBrains.Annotations;
using LINGYUN.Abp.BackgroundTasks.Jobs;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Timing;
namespace LINGYUN.Abp.BackgroundTasks.ExceptionHandling;
[Dependency(ReplaceServices = true)]
public class JobExceptionNotifier : IJobExceptionNotifier, ITransientDependency
{
public const string Prefix = "exception.";
protected IClock Clock { get; }
protected IJobStore JobStore { get; }
protected IJobScheduler JobScheduler { get; }
public JobExceptionNotifier(
IClock clock,
IJobStore jobStore,
IJobScheduler jobScheduler)
{
Clock = clock;
JobStore = jobStore;
JobScheduler = jobScheduler;
}
public virtual async Task NotifyAsync([NotNull] JobExceptionNotificationContext context)
{
var notifyKey = Prefix + SendEmailJob.PropertyTo;
if (context.JobInfo.Args.TryGetValue(notifyKey, out var exceptionTo))
{
var template = context.JobInfo.Args.GetOrDefault(Prefix + SendEmailJob.PropertyTemplate) ?? "";
var subject = context.JobInfo.Args.GetOrDefault(Prefix + SendEmailJob.PropertySubject) ?? "From job execute exception";
var globalContext = context.JobInfo.Args.GetOrDefault(Prefix + SendEmailJob.PropertyContext) ?? "{}";
var from = context.JobInfo.Args.GetOrDefault(Prefix + SendEmailJob.PropertyFrom) ?? "";
var culture = context.JobInfo.Args.GetOrDefault(Prefix + SendEmailJob.PropertyCulture) ?? CultureInfo.CurrentCulture.Name;
var jobId = Guid.NewGuid();
var jobArgs = new Dictionary<string, object>
{
{ SendEmailJob.PropertyTo, exceptionTo.ToString() },
{ SendEmailJob.PropertySubject, subject },
{ SendEmailJob.PropertyBody, context.Exception.GetBaseException().Message },
{ SendEmailJob.PropertyTemplate, template },
{ SendEmailJob.PropertyContext, globalContext },
{ SendEmailJob.PropertyFrom, from },
{ SendEmailJob.PropertyCulture, culture }
};
var jobInfo = new JobInfo
{
Id = jobId,
Name = jobId.ToString(),
Group = "ExceptionHandling",
Priority = JobPriority.Normal,
BeginTime = Clock.Now,
Args = jobArgs,
Description = subject.ToString(),
JobType = JobType.Once,
Interval = 5,
MaxCount = 1,
MaxTryCount = 1,
CreationTime = Clock.Now,
Status = JobStatus.None,
Type = DefaultJobNames.SendEmailJob,
};
await JobStore.StoreAsync(jobInfo);
await JobScheduler.TriggerAsync(jobInfo);
}
}
}

4
aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> <Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait /> <ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers> </Weavers>

58
aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Jobs/LINGYUN/Abp/BackgroundTasks/Jobs/SendEmailJob.cs

@ -1,26 +1,76 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Emailing; using Volo.Abp.Emailing;
using Volo.Abp.TextTemplating;
using Volo.Abp.Json;
using System.Collections.Generic;
using System;
namespace LINGYUN.Abp.BackgroundTasks.Jobs; namespace LINGYUN.Abp.BackgroundTasks.Jobs;
public class SendEmailJob : IJobRunnable public class SendEmailJob : IJobRunnable
{ {
public const string PropertyFrom = "from"; public const string PropertyFrom = "from";
/// <summary>
/// 接收者
/// </summary>
public const string PropertyTo = "to"; public const string PropertyTo = "to";
/// <summary>
/// 必须,邮件主体
/// </summary>
public const string PropertySubject = "subject"; public const string PropertySubject = "subject";
/// <summary>
/// 消息内容, 文本消息时必须
/// </summary>
public const string PropertyBody = "body"; public const string PropertyBody = "body";
public const string PropertyIsBodyHtml = "isBodyHtml";
/// <summary>
/// 发送模板消息
/// </summary>
public const string PropertyTemplate = "template";
/// <summary>
/// 可选, 模板消息中的上下文参数
/// </summary>
public const string PropertyContext = "context";
/// <summary>
/// 可选, 模板消息中的区域性
/// </summary>
public const string PropertyCulture = "culture";
public virtual async Task ExecuteAsync(JobRunnableContext context) public virtual async Task ExecuteAsync(JobRunnableContext context)
{ {
context.TryGetString(PropertyFrom, out var from); context.TryGetString(PropertyFrom, out var from);
var to = context.GetString(PropertyTo); var to = context.GetString(PropertyTo);
var subject = context.GetString(PropertySubject); var subject = context.GetString(PropertySubject);
var body = context.GetString(PropertyBody);
context.TryGetJobData<bool>(PropertyIsBodyHtml, out var isBodyHtml);
var emailSender = context.GetRequiredService<IEmailSender>(); var emailSender = context.GetRequiredService<IEmailSender>();
await emailSender.QueueAsync(from, to, subject, body, isBodyHtml); if (context.TryGetString(PropertyTemplate, out var template) && !template.IsNullOrWhiteSpace())
{
var globalContext = new Dictionary<string, object>();
context.TryGetString(PropertyCulture, out var culture);
if (context.TryGetString(PropertyContext, out var globalCtx))
{
var jsonSerializer = context.GetRequiredService<IJsonSerializer>();
try
{
globalContext = jsonSerializer.Deserialize<Dictionary<string, object>>(globalCtx);
}
catch { }
}
var templateRenderer = context.GetRequiredService<ITemplateRenderer>();
var content = await templateRenderer.RenderAsync(
templateName: template,
cultureName: culture,
globalContext: globalContext);
await emailSender.QueueAsync(from, to, subject, content, true);
return;
}
var body = context.GetString(PropertyBody);
await emailSender.QueueAsync(from, to, subject, body, false);
} }
} }

20
aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/Internal/JobExecutedEvent.cs

@ -1,4 +1,6 @@
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
@ -50,8 +52,9 @@ public class JobExecutedEvent : JobEventBase<JobExecutedEvent>, ITransientDepend
job.Status = JobStatus.Stopped; job.Status = JobStatus.Stopped;
job.IsAbandoned = true; job.IsAbandoned = true;
job.NextRunTime = null; job.NextRunTime = null;
await RemoveJobAsync(context, job); await RemoveJobAsync(context, job);
// 重试达到上限发布异常通知
await NotifierAsync(context, job);
} }
} }
else else
@ -75,4 +78,19 @@ public class JobExecutedEvent : JobEventBase<JobExecutedEvent>, ITransientDepend
var jobScheduler = context.ServiceProvider.GetRequiredService<IJobScheduler>(); var jobScheduler = context.ServiceProvider.GetRequiredService<IJobScheduler>();
await jobScheduler.RemoveAsync(jobInfo); await jobScheduler.RemoveAsync(jobInfo);
} }
private async Task NotifierAsync(JobEventContext context, JobInfo jobInfo)
{
try
{
var notifier = context.ServiceProvider.GetRequiredService<IJobExceptionNotifier>();
var exceptionContext = new JobExceptionNotificationContext(jobInfo, context.EventData.Exception);
await notifier.NotifyAsync(exceptionContext);
}
catch (Exception ex)
{
Logger.LogWarning($"An exception thow with job exception notify: {ex.Message}");
}
}
} }

1
aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/LY.MicroService.TaskManagement.HttpApi.Host.csproj

@ -50,6 +50,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" /> <ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.ExceptionHandling.Emailing\LINGYUN.Abp.ExceptionHandling.Emailing.csproj" /> <ProjectReference Include="..\..\modules\common\LINGYUN.Abp.ExceptionHandling.Emailing\LINGYUN.Abp.ExceptionHandling.Emailing.csproj" />
<ProjectReference Include="..\..\modules\task-management\LINGYUN.Abp.BackgroundTasks.ExceptionHandling\LINGYUN.Abp.BackgroundTasks.ExceptionHandling.csproj" />
<ProjectReference Include="..\..\modules\task-management\LINGYUN.Abp.BackgroundTasks.Jobs\LINGYUN.Abp.BackgroundTasks.Jobs.csproj" /> <ProjectReference Include="..\..\modules\task-management\LINGYUN.Abp.BackgroundTasks.Jobs\LINGYUN.Abp.BackgroundTasks.Jobs.csproj" />
<ProjectReference Include="..\..\modules\task-management\LINGYUN.Abp.BackgroundTasks.Quartz\LINGYUN.Abp.BackgroundTasks.Quartz.csproj" /> <ProjectReference Include="..\..\modules\task-management\LINGYUN.Abp.BackgroundTasks.Quartz\LINGYUN.Abp.BackgroundTasks.Quartz.csproj" />
<ProjectReference Include="..\..\modules\task-management\LINGYUN.Abp.TaskManagement.Application\LINGYUN.Abp.TaskManagement.Application.csproj" /> <ProjectReference Include="..\..\modules\task-management\LINGYUN.Abp.TaskManagement.Application\LINGYUN.Abp.TaskManagement.Application.csproj" />

2
aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.cs

@ -1,4 +1,5 @@
using LINGYUN.Abp.AuditLogging.Elasticsearch; using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.BackgroundTasks.ExceptionHandling;
using LINGYUN.Abp.BackgroundTasks.Jobs; using LINGYUN.Abp.BackgroundTasks.Jobs;
using LINGYUN.Abp.BackgroundTasks.Quartz; using LINGYUN.Abp.BackgroundTasks.Quartz;
using LINGYUN.Abp.Data.DbMigrator; using LINGYUN.Abp.Data.DbMigrator;
@ -45,6 +46,7 @@ namespace LY.MicroService.TaskManagement;
typeof(AbpDbFinderMultiTenancyModule), typeof(AbpDbFinderMultiTenancyModule),
typeof(AbpBackgroundTasksJobsModule), typeof(AbpBackgroundTasksJobsModule),
typeof(AbpBackgroundTasksQuartzModule), typeof(AbpBackgroundTasksQuartzModule),
typeof(AbpBackgroundTasksExceptionHandlingModule),
typeof(TaskManagementApplicationModule), typeof(TaskManagementApplicationModule),
typeof(TaskManagementHttpApiModule), typeof(TaskManagementHttpApiModule),
typeof(TaskManagementEntityFrameworkCoreModule), typeof(TaskManagementEntityFrameworkCoreModule),

Loading…
Cancel
Save