forked from gongxuegit/tiku-backend.net
refactor: consolidate backend into modular monolith
This commit is contained in:
@@ -16,8 +16,7 @@ namespace Tiku.Infrastructure.Jobs;
|
||||
internal sealed class BackgroundJobService(
|
||||
TikuDbContext dbContext,
|
||||
ITenantExecutionScope tenantExecutionScope,
|
||||
IFeatureAccessService featureAccessService,
|
||||
IBackgroundJobDispatcher backgroundJobDispatcher) : IBackgroundJobService
|
||||
IFeatureAccessService featureAccessService) : IBackgroundJobService
|
||||
{
|
||||
private static readonly TimeSpan LeaseDuration = TimeSpan.FromMinutes(5);
|
||||
|
||||
@@ -71,15 +70,6 @@ internal sealed class BackgroundJobService(
|
||||
}
|
||||
throw;
|
||||
}
|
||||
if (job.RunAfter is null && backgroundJobDispatcher.IsEnabled)
|
||||
{
|
||||
await backgroundJobDispatcher.DispatchAsync(
|
||||
job.Id,
|
||||
job.TenantId,
|
||||
job.JobType,
|
||||
job.Id.ToString("N"),
|
||||
cancellationToken);
|
||||
}
|
||||
return ToItem(job);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user