Browse Source

/

pull/586/head
cKey 4 years ago
parent
commit
804caccaf2
  1. 2
      aspnet-core/LINGYUN.MicroService.TaskManagement.sln
  2. 2
      aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN.Abp.Cli.csproj
  3. 4
      aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Notifications/LINGYUN/Abp/ExceptionHandling/Notifications/AbpExceptionHandlingNotificationDefinitionProvider.cs
  4. 1
      aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN.Abp.Notifications.csproj
  5. 21
      aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationCleanupOptions.cs
  6. 24
      aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationModule.cs
  7. 41
      aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/Internal/NotificationCleanupBackgroundWorker.cs
  8. 45
      aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationPublishJob.cs
  9. 20
      aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationPublishJobArgs.cs
  10. 14
      aspnet-core/modules/console/LINGYUN.Abp.Encryption.Console/AbpEncryptionConsoleModule.cs
  11. 5
      aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Notifications/INotificationRepository.cs
  12. 4
      aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Notifications/NotificationStore.cs
  13. 15
      aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Notifications/EfCoreNotificationRepository.cs
  14. 22
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/BackgroundJobs/NotificationCleanupJob.cs
  15. 45
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/BackgroundJobs/NotificationPublishJob.cs
  16. 20
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/BackgroundJobs/NotificationPublishJobArgs.cs
  17. 7
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs
  18. 8
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj
  19. 102
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.Configure.cs
  20. 31
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs
  21. 22
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/appsettings.Development.json

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

@ -44,7 +44,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.TaskManagement.
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.BackgroundTasks.TaskManagement", "modules\task-management\LINGYUN.Abp.BackgroundTasks.TaskManagement\LINGYUN.Abp.BackgroundTasks.TaskManagement.csproj", "{7937785C-0D28-46B3-A7E7-0B592821A1F2}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.BackgroundTasks.TaskManagement", "modules\task-management\LINGYUN.Abp.BackgroundTasks.TaskManagement\LINGYUN.Abp.BackgroundTasks.TaskManagement.csproj", "{7937785C-0D28-46B3-A7E7-0B592821A1F2}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.BackgroundTasks.EventBus", "modules\task-management\LINGYUN.Abp.BackgroundTasks.EventBus\LINGYUN.Abp.BackgroundTasks.EventBus.csproj", "{D17DEF79-635B-478D-89D7-32EAE616869A}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.BackgroundTasks.EventBus", "modules\task-management\LINGYUN.Abp.BackgroundTasks.EventBus\LINGYUN.Abp.BackgroundTasks.EventBus.csproj", "{D17DEF79-635B-478D-89D7-32EAE616869A}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution

2
aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN.Abp.Cli.csproj

@ -5,7 +5,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Version>5.2.0</Version> <Version>5.2.1</Version>
<Copyright>colin</Copyright> <Copyright>colin</Copyright>
<Description>Use LINGYUN.MicroService.Templates command line</Description> <Description>Use LINGYUN.MicroService.Templates command line</Description>
<PackAsTool>true</PackAsTool> <PackAsTool>true</PackAsTool>

4
aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Notifications/LINGYUN/Abp/ExceptionHandling/Notifications/AbpExceptionHandlingNotificationDefinitionProvider.cs

@ -19,7 +19,9 @@ namespace LINGYUN.Abp.ExceptionHandling.Notifications
description: L("Notifications:ExceptionNotifier"), description: L("Notifications:ExceptionNotifier"),
notificationType: NotificationType.System, notificationType: NotificationType.System,
lifetime: NotificationLifetime.Persistent, lifetime: NotificationLifetime.Persistent,
allowSubscriptionToClients: false); allowSubscriptionToClients: false)
// TODO: 全局常量
.WithProviders("SignalR");
} }
protected LocalizableString L(string name) protected LocalizableString L(string name)

1
aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN.Abp.Notifications.csproj

@ -12,7 +12,6 @@
<PackageReference Include="Volo.Abp.EventBus" Version="$(VoloAbpPackageVersion)" /> <PackageReference Include="Volo.Abp.EventBus" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.Json" Version="$(VoloAbpPackageVersion)" /> <PackageReference Include="Volo.Abp.Json" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.BackgroundJobs.Abstractions" Version="$(VoloAbpPackageVersion)" /> <PackageReference Include="Volo.Abp.BackgroundJobs.Abstractions" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.BackgroundWorkers" Version="$(VoloAbpPackageVersion)" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

21
aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationCleanupOptions.cs

@ -1,21 +0,0 @@
namespace LINGYUN.Abp.Notifications
{
public class AbpNotificationCleanupOptions
{
/// <summary>
/// 是否启用清理任务
/// 默认:启用
/// </summary>
public bool IsEnabled { get; set; } = true;
/// <summary>
/// 清理时间间隔
/// 默认:30_0000ms
/// </summary>
public int CleanupPeriod { get; set; } = 30_0000;
/// <summary>
/// 清理批次
/// 默认: 200
/// </summary>
public int CleanupBatchSize { get; set; } = 200;
}
}

24
aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationModule.cs

@ -1,17 +1,12 @@
using LINGYUN.Abp.IdGenerator; using LINGYUN.Abp.IdGenerator;
using LINGYUN.Abp.Notifications.Internal;
using LINGYUN.Abp.RealTime; using LINGYUN.Abp.RealTime;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.BackgroundJobs; using Volo.Abp.BackgroundJobs;
using Volo.Abp.BackgroundWorkers; using Volo.Abp.BackgroundWorkers;
using Volo.Abp.Json; using Volo.Abp.Json;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.Threading;
namespace LINGYUN.Abp.Notifications namespace LINGYUN.Abp.Notifications
{ {
@ -30,25 +25,6 @@ namespace LINGYUN.Abp.Notifications
AutoAddDefinitionProviders(context.Services); AutoAddDefinitionProviders(context.Services);
} }
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
AsyncHelper.RunSync(() => OnApplicationInitializationAsync(context));
}
public override async Task OnApplicationInitializationAsync(ApplicationInitializationContext context)
{
var options = context.ServiceProvider.GetRequiredService<IOptions<AbpNotificationCleanupOptions>>().Value;
if (options.IsEnabled)
{
await context.ServiceProvider
.GetRequiredService<IBackgroundWorkerManager>()
.AddAsync(
context.ServiceProvider
.GetRequiredService<NotificationCleanupBackgroundWorker>()
);
}
}
private void AutoAddDefinitionProviders(IServiceCollection services) private void AutoAddDefinitionProviders(IServiceCollection services)
{ {
var definitionProviders = new List<Type>(); var definitionProviders = new List<Type>();

41
aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/Internal/NotificationCleanupBackgroundWorker.cs

@ -1,41 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System;
using System.Threading.Tasks;
using Volo.Abp.BackgroundWorkers;
using Volo.Abp.Threading;
namespace LINGYUN.Abp.Notifications.Internal
{
internal class NotificationCleanupBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
{
protected AbpNotificationCleanupOptions Options { get; }
public NotificationCleanupBackgroundWorker(
AbpAsyncTimer timer,
IServiceScopeFactory serviceScopeFactory,
IOptions<AbpNotificationCleanupOptions> options)
: base(timer, serviceScopeFactory)
{
Options = options.Value;
timer.Period = Options.CleanupPeriod;
}
protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext)
{
try
{
var store = workerContext.ServiceProvider.GetRequiredService<INotificationStore>();
Logger.LogDebug("Before cleanup exprition jobs...");
await store.DeleteNotificationAsync(Options.CleanupBatchSize);
Logger.LogDebug("Exprition jobs cleanup job was successful...");
}
catch (Exception ex)
{
Logger.LogWarning("Exprition jobs cleanup job was failed...");
Logger.LogWarning("Error:{0}", ex.Message);
}
}
}
}

45
aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationPublishJob.cs

@ -1,45 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using System;
using System.Threading.Tasks;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.DependencyInjection;
namespace LINGYUN.Abp.Notifications
{
public class NotificationPublishJob : AsyncBackgroundJob<NotificationPublishJobArgs>, ITransientDependency
{
protected AbpNotificationOptions Options { get; }
protected INotificationStore Store { get; }
protected IServiceProvider ServiceProvider { get; }
public NotificationPublishJob(
IOptions<AbpNotificationOptions> options,
INotificationStore store,
IServiceProvider serviceProvider)
{
Store = store;
Options = options.Value;
ServiceProvider = serviceProvider;
}
public override async Task ExecuteAsync(NotificationPublishJobArgs args)
{
var providerType = Type.GetType(args.ProviderType);
if (ServiceProvider.GetRequiredService(providerType) is INotificationPublishProvider publishProvider)
{
var notification = await Store.GetNotificationOrNullAsync(args.TenantId, args.NotificationId);
notification.Data = NotificationDataConverter.Convert(notification.Data);
var notifacationDataMapping = Options.NotificationDataMappings
.GetMapItemOrDefault(notification.Name, publishProvider.Name);
if (notifacationDataMapping != null)
{
notification.Data = notifacationDataMapping.MappingFunc(notification.Data);
}
await publishProvider.PublishAsync(notification, args.UserIdentifiers);
}
}
}
}

20
aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationPublishJobArgs.cs

@ -1,20 +0,0 @@
using System;
using System.Collections.Generic;
namespace LINGYUN.Abp.Notifications
{
public class NotificationPublishJobArgs
{
public Guid? TenantId { get; set; }
public long NotificationId { get; set; }
public string ProviderType { get; set; }
public List<UserIdentifier> UserIdentifiers { get; set; }
public NotificationPublishJobArgs(long id, string providerType, List<UserIdentifier> userIdentifiers, Guid? tenantId = null )
{
NotificationId = id;
ProviderType = providerType;
UserIdentifiers = userIdentifiers;
TenantId = tenantId;
}
}
}

14
aspnet-core/modules/console/LINGYUN.Abp.Encryption.Console/AbpEncryptionConsoleModule.cs

@ -1,5 +1,7 @@
using Volo.Abp.Modularity; using System.Text;
using Volo.Abp.Modularity;
using Volo.Abp.Security; using Volo.Abp.Security;
using Volo.Abp.Security.Encryption;
namespace LINGYUN.Abp.Encryption.Console namespace LINGYUN.Abp.Encryption.Console
{ {
@ -7,6 +9,14 @@ namespace LINGYUN.Abp.Encryption.Console
typeof(AbpSecurityModule))] typeof(AbpSecurityModule))]
public class AbpEncryptionConsoleModule : AbpModule public class AbpEncryptionConsoleModule : AbpModule
{ {
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpStringEncryptionOptions>(options =>
{
options.DefaultPassPhrase = "s46c5q55nxpeS8Ra";
options.InitVectorBytes = Encoding.ASCII.GetBytes("s83ng0abvd02js84");
options.DefaultSalt = Encoding.ASCII.GetBytes("sf&5)s3#");
});
}
} }
} }

5
aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Notifications/INotificationRepository.cs

@ -1,4 +1,5 @@
using System.Threading; using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories;
@ -10,7 +11,7 @@ namespace LINGYUN.Abp.MessageService.Notifications
long notificationId, long notificationId,
CancellationToken cancellationToken = default); CancellationToken cancellationToken = default);
Task DeleteExpritionAsync( Task<List<Notification>> GetExpritionAsync(
int batchCount, int batchCount,
CancellationToken cancellationToken = default); CancellationToken cancellationToken = default);
} }

4
aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Notifications/NotificationStore.cs

@ -92,7 +92,9 @@ namespace LINGYUN.Abp.MessageService.Notifications
{ {
using (var unitOfWork = _unitOfWorkManager.Begin()) using (var unitOfWork = _unitOfWorkManager.Begin())
{ {
await _notificationRepository.DeleteExpritionAsync(batchCount, cancellationToken); var notitications = await _notificationRepository.GetExpritionAsync(batchCount, cancellationToken);
await _notificationRepository.DeleteManyAsync(notitications);
await unitOfWork.CompleteAsync(cancellationToken); await unitOfWork.CompleteAsync(cancellationToken);
} }

15
aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN/Abp/MessageService/Notifications/EfCoreNotificationRepository.cs

@ -1,6 +1,7 @@
using LINGYUN.Abp.MessageService.EntityFrameworkCore; using LINGYUN.Abp.MessageService.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -19,20 +20,14 @@ namespace LINGYUN.Abp.MessageService.Notifications
{ {
} }
public async Task DeleteExpritionAsync( public async Task<List<Notification>> GetExpritionAsync(
int batchCount, int batchCount,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
var dbSet = await GetDbSetAsync(); return await (await GetDbSetAsync())
var batchDeleteNoticeWithIds = await dbSet .Where(x => x.ExpirationTime.Value.CompareTo(DateTime.Now) <= 0)
.Where(x => x.ExpirationTime <= DateTime.Now)
.Take(batchCount) .Take(batchCount)
.Select(x => new Notification(x.Id)) .ToListAsync(GetCancellationToken(cancellationToken));
.AsNoTracking()
.ToArrayAsync(GetCancellationToken(cancellationToken));
dbSet.AttachRange(batchDeleteNoticeWithIds);
dbSet.RemoveRange(batchDeleteNoticeWithIds);
} }
public async Task<Notification> GetByIdAsync( public async Task<Notification> GetByIdAsync(

22
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/BackgroundJobs/NotificationCleanupJob.cs

@ -0,0 +1,22 @@
using LINGYUN.Abp.BackgroundTasks;
using LINGYUN.Abp.Notifications;
using System.Threading.Tasks;
namespace LY.MicroService.RealtimeMessage.BackgroundJobs;
public class NotificationCleanupJob : IJobRunnable
{
/// <summary>
/// 每次清除记录大小
/// </summary>
public const string PropertyBatchCount = "BatchCount";
public async virtual Task ExecuteAsync(JobRunnableContext context)
{
var count = context.GetJobData<int>(PropertyBatchCount);
var store = context.GetRequiredService<INotificationStore>();
await store.DeleteNotificationAsync(count);
}
}

45
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/BackgroundJobs/NotificationPublishJob.cs

@ -0,0 +1,45 @@
using LINGYUN.Abp.Notifications;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using System;
using System.Threading.Tasks;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.DependencyInjection;
namespace LY.MicroService.RealtimeMessage.BackgroundJobs;
public class NotificationPublishJob : AsyncBackgroundJob<NotificationPublishJobArgs>, ITransientDependency
{
protected AbpNotificationOptions Options { get; }
protected INotificationStore Store { get; }
protected IServiceProvider ServiceProvider { get; }
public NotificationPublishJob(
IOptions<AbpNotificationOptions> options,
INotificationStore store,
IServiceProvider serviceProvider)
{
Store = store;
Options = options.Value;
ServiceProvider = serviceProvider;
}
public override async Task ExecuteAsync(NotificationPublishJobArgs args)
{
var providerType = Type.GetType(args.ProviderType);
if (ServiceProvider.GetRequiredService(providerType) is INotificationPublishProvider publishProvider)
{
var notification = await Store.GetNotificationOrNullAsync(args.TenantId, args.NotificationId);
notification.Data = NotificationDataConverter.Convert(notification.Data);
var notifacationDataMapping = Options.NotificationDataMappings
.GetMapItemOrDefault(notification.Name, publishProvider.Name);
if (notifacationDataMapping != null)
{
notification.Data = notifacationDataMapping.MappingFunc(notification.Data);
}
await publishProvider.PublishAsync(notification, args.UserIdentifiers);
}
}
}

20
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/BackgroundJobs/NotificationPublishJobArgs.cs

@ -0,0 +1,20 @@
using LINGYUN.Abp.Notifications;
using System;
using System.Collections.Generic;
namespace LY.MicroService.RealtimeMessage.BackgroundJobs;
public class NotificationPublishJobArgs
{
public Guid? TenantId { get; set; }
public long NotificationId { get; set; }
public string ProviderType { get; set; }
public List<UserIdentifier> UserIdentifiers { get; set; }
public NotificationPublishJobArgs(long id, string providerType, List<UserIdentifier> userIdentifiers, Guid? tenantId = null)
{
NotificationId = id;
ProviderType = providerType;
UserIdentifiers = userIdentifiers;
TenantId = tenantId;
}
}

7
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs

@ -1,4 +1,5 @@
using LINGYUN.Abp.Notifications; using LINGYUN.Abp.Notifications;
using LY.MicroService.RealtimeMessage.BackgroundJobs;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
@ -121,6 +122,12 @@ namespace LY.MicroService.RealtimeMessage.EventBus.Distributed
var providers = Enumerable var providers = Enumerable
.Reverse(NotificationPublishProviderManager.Providers); .Reverse(NotificationPublishProviderManager.Providers);
// 过滤用户指定提供者
if (notification.Providers.Any())
{
providers = providers.Where(p => notification.Providers.Contains(p.Name));
}
await PublishFromProvidersAsync(providers, eventData.Users, notificationInfo); await PublishFromProvidersAsync(providers, eventData.Users, notificationInfo);
} }
} }

8
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj

@ -19,6 +19,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" />
<PackageReference Include="Quartz.Serialization.Json" Version="$(QuartzNETPackageVersion)" />
<PackageReference Include="Serilog.AspNetCore" Version="$(SerilogAspNetCorePackageVersion)" /> <PackageReference Include="Serilog.AspNetCore" Version="$(SerilogAspNetCorePackageVersion)" />
<PackageReference Include="Serilog.Enrichers.Environment" Version="$(SerilogEnrichersEnvironmentPackageVersion)" /> <PackageReference Include="Serilog.Enrichers.Environment" Version="$(SerilogEnrichersEnvironmentPackageVersion)" />
<PackageReference Include="Serilog.Enrichers.Assembly" Version="$(SerilogEnrichersAssemblyPackageVersion)" /> <PackageReference Include="Serilog.Enrichers.Assembly" Version="$(SerilogEnrichersAssemblyPackageVersion)" />
@ -43,16 +44,15 @@
<ProjectReference Include="..\..\modules\auditing\LINGYUN.Abp.AuditLogging.Elasticsearch\LINGYUN.Abp.AuditLogging.Elasticsearch.csproj" /> <ProjectReference Include="..\..\modules\auditing\LINGYUN.Abp.AuditLogging.Elasticsearch\LINGYUN.Abp.AuditLogging.Elasticsearch.csproj" />
<ProjectReference Include="..\..\modules\authorization\LINGYUN.Abp.Authorization.OrganizationUnits\LINGYUN.Abp.Authorization.OrganizationUnits.csproj" /> <ProjectReference Include="..\..\modules\authorization\LINGYUN.Abp.Authorization.OrganizationUnits\LINGYUN.Abp.Authorization.OrganizationUnits.csproj" />
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.AspNetCore.HttpOverrides\LINGYUN.Abp.AspNetCore.HttpOverrides.csproj" /> <ProjectReference Include="..\..\modules\common\LINGYUN.Abp.AspNetCore.HttpOverrides\LINGYUN.Abp.AspNetCore.HttpOverrides.csproj" />
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.BackgroundWorkers.Hangfire\LINGYUN.Abp.BackgroundWorkers.Hangfire.csproj" />
<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.Notifications\LINGYUN.Abp.ExceptionHandling.Notifications.csproj" /> <ProjectReference Include="..\..\modules\common\LINGYUN.Abp.ExceptionHandling.Notifications\LINGYUN.Abp.ExceptionHandling.Notifications.csproj" />
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Hangfire.Dashboard\LINGYUN.Abp.Hangfire.Dashboard.csproj" />
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Hangfire.MySqlStorage\LINGYUN.Abp.Hangfire.Storage.MySql.csproj" />
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.BackgroundJobs.Hangfire\LINGYUN.Abp.BackgroundJobs.Hangfire.csproj" />
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.EventBus.CAP\LINGYUN.Abp.EventBus.CAP.csproj" /> <ProjectReference Include="..\..\modules\common\LINGYUN.Abp.EventBus.CAP\LINGYUN.Abp.EventBus.CAP.csproj" />
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.IM.SignalR\LINGYUN.Abp.IM.SignalR.csproj" /> <ProjectReference Include="..\..\modules\common\LINGYUN.Abp.IM.SignalR\LINGYUN.Abp.IM.SignalR.csproj" />
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Notifications.SignalR\LINGYUN.Abp.Notifications.SignalR.csproj" /> <ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Notifications.SignalR\LINGYUN.Abp.Notifications.SignalR.csproj" />
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Notifications.Sms\LINGYUN.Abp.Notifications.Sms.csproj" /> <ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Notifications.Sms\LINGYUN.Abp.Notifications.Sms.csproj" />
<ProjectReference Include="..\..\modules\task-management\LINGYUN.Abp.BackgroundTasks.Quartz\LINGYUN.Abp.BackgroundTasks.Quartz.csproj" />
<ProjectReference Include="..\..\modules\task-management\LINGYUN.Abp.BackgroundTasks.ExceptionHandling\LINGYUN.Abp.BackgroundTasks.ExceptionHandling.csproj" />
<ProjectReference Include="..\..\modules\task-management\LINGYUN.Abp.TaskManagement.EntityFrameworkCore\LINGYUN.Abp.TaskManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" /> <ProjectReference Include="..\..\modules\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\modules\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" /> <ProjectReference Include="..\..\modules\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />
<ProjectReference Include="..\..\modules\logging\LINGYUN.Abp.Serilog.Enrichers.UniqueId\LINGYUN.Abp.Serilog.Enrichers.UniqueId.csproj" /> <ProjectReference Include="..\..\modules\logging\LINGYUN.Abp.Serilog.Enrichers.UniqueId\LINGYUN.Abp.Serilog.Enrichers.UniqueId.csproj" />

102
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.Configure.cs

@ -1,30 +1,26 @@
using DotNetCore.CAP; using DotNetCore.CAP;
using Hangfire; using LINGYUN.Abp.BackgroundTasks;
using Hangfire.Dashboard;
using LINGYUN.Abp.ExceptionHandling; using LINGYUN.Abp.ExceptionHandling;
using LINGYUN.Abp.Hangfire.Dashboard.Authorization;
using LINGYUN.Abp.Localization.CultureMap; using LINGYUN.Abp.Localization.CultureMap;
using LINGYUN.Abp.MessageService.Localization; using LINGYUN.Abp.MessageService.Localization;
using LINGYUN.Abp.MessageService.Permissions;
using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.Application;
using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.Serilog.Enrichers.UniqueId;
using LY.MicroService.RealtimeMessage.BackgroundJobs;
using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Cors; using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Caching.StackExchangeRedis; using Microsoft.Extensions.Caching.StackExchangeRedis;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.OpenApi.Models; using Microsoft.OpenApi.Models;
using Quartz;
using StackExchange.Redis; using StackExchange.Redis;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text.Encodings.Web; using System.Text.Encodings.Web;
using System.Text.Unicode; using System.Text.Unicode;
using System.Threading.Tasks;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.AspNetCore.Auditing;
using Volo.Abp.Auditing; using Volo.Abp.Auditing;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
@ -33,16 +29,15 @@ using Volo.Abp.Json;
using Volo.Abp.Json.SystemTextJson; using Volo.Abp.Json.SystemTextJson;
using Volo.Abp.Localization; using Volo.Abp.Localization;
using Volo.Abp.MultiTenancy; using Volo.Abp.MultiTenancy;
using Volo.Abp.Quartz;
using Volo.Abp.Threading; using Volo.Abp.Threading;
using Volo.Abp.Timing;
using Volo.Abp.VirtualFileSystem; using Volo.Abp.VirtualFileSystem;
using HangfireDashboardOptions = Hangfire.DashboardOptions;
namespace LY.MicroService.RealtimeMessage; namespace LY.MicroService.RealtimeMessage;
public partial class RealtimeMessageHttpApiHostModule public partial class RealtimeMessageHttpApiHostModule
{ {
protected static string[] PrefixTokenQueryStrings = new [] { "/signalr-hubs", "/hangfire" }; protected const string ApplicationName = "MessageService";
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
@ -56,7 +51,7 @@ public partial class RealtimeMessageHttpApiHostModule
private void PreConfigureApp() private void PreConfigureApp()
{ {
AbpSerilogEnrichersConsts.ApplicationName = "MessageService"; AbpSerilogEnrichersConsts.ApplicationName = ApplicationName;
PreConfigure<AbpSerilogEnrichersUniqueIdOptions>(options => PreConfigure<AbpSerilogEnrichersUniqueIdOptions>(options =>
{ {
@ -84,16 +79,41 @@ public partial class RealtimeMessageHttpApiHostModule
}); });
} }
private void PreCongifureHangfire() private void PreConfigureQuartz(IConfiguration configuration)
{ {
PreConfigure<HangfireDashboardOptions>(options => PreConfigure<AbpQuartzOptions>(options =>
{ {
options.AsyncAuthorization = new IDashboardAsyncAuthorizationFilter[] // 如果使用持久化存储, 则配置quartz持久层
if (configuration.GetSection("Quartz:UsePersistentStore").Get<bool>())
{ {
new DashboardAuthorizationFilter( var settings = configuration.GetSection("Quartz:Properties").Get<Dictionary<string, string>>();
MessageServicePermissions.Hangfire.Dashboard, if (settings != null)
MessageServicePermissions.Hangfire.ManageQueue) {
foreach (var setting in settings)
{
options.Properties[setting.Key] = setting.Value;
}
}
options.Configurator += (config) =>
{
config.UsePersistentStore(store =>
{
store.UseProperties = false;
store.UseJsonSerializer();
});
}; };
}
});
}
private void ConfigureBackgroundTasks()
{
Configure<AbpBackgroundTasksOptions>(options =>
{
options.NodeName = ApplicationName;
options.AddProvider<NotificationCleanupJob>("NotificationCleanupJob");
}); });
} }
@ -139,14 +159,9 @@ public partial class RealtimeMessageHttpApiHostModule
private void ConfigureAuditing(IConfiguration configuration) private void ConfigureAuditing(IConfiguration configuration)
{ {
Configure<AbpAspNetCoreAuditingOptions>(options =>
{
options.IgnoredUrls.AddIfNotContains("/hangfire");
});
Configure<AbpAuditingOptions>(options => Configure<AbpAuditingOptions>(options =>
{ {
options.ApplicationName = "MessageService"; options.ApplicationName = ApplicationName;
// 是否启用实体变更记录 // 是否启用实体变更记录
var entitiesChangedConfig = configuration.GetSection("App:TrackingEntitiesChanged"); var entitiesChangedConfig = configuration.GetSection("App:TrackingEntitiesChanged");
if (entitiesChangedConfig.Exists() && entitiesChangedConfig.Get<bool>()) if (entitiesChangedConfig.Exists() && entitiesChangedConfig.Get<bool>())
@ -300,42 +315,6 @@ public partial class RealtimeMessageHttpApiHostModule
options.Authority = configuration["AuthServer:Authority"]; options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = false; options.RequireHttpsMetadata = false;
options.Audience = configuration["AuthServer:ApiName"]; options.Audience = configuration["AuthServer:ApiName"];
options.Events = new JwtBearerEvents
{
OnMessageReceived = context =>
{
var accessToken = context.Request.Query["access_token"];
var path = context.HttpContext.Request.Path;
if (!string.IsNullOrEmpty(accessToken) &&
PrefixTokenQueryStrings.Any(prefix => path.StartsWithSegments(prefix)))
{
// 解决仪表板自定义授权问题
context.Token = accessToken;
var clock = context.HttpContext.RequestServices.GetRequiredService<IClock>();
var protectedProvider = context.HttpContext.RequestServices.GetRequiredService<IDataProtectionProvider>();
var protector = protectedProvider.CreateProtector("_hangfire_tk");
var tokenCookies = protector.Protect(accessToken);
context.HttpContext.Response.Cookies.Append(
"_hangfire_tk",
tokenCookies,
new CookieOptions
{
Expires = clock.Now.AddMinutes(10)
});
}
if (context.Token.IsNullOrWhiteSpace() &&
context.Request.Cookies.TryGetValue("_hangfire_tk", out var protectedToken))
{
var protectedProvider = context.HttpContext.RequestServices.GetRequiredService<IDataProtectionProvider>();
var protector = protectedProvider.CreateProtector("_hangfire_tk");
context.Token = protector.Unprotect(protectedToken);
}
return Task.CompletedTask;
},
};
}); });
if (!isDevelopment) if (!isDevelopment)
@ -347,9 +326,4 @@ public partial class RealtimeMessageHttpApiHostModule
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys"); .PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys");
} }
} }
private void ConfigureHangfireServer(IServiceCollection services)
{
services.AddHangfireServer();
}
} }

31
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs

@ -1,14 +1,12 @@
using DotNetCore.CAP; using DotNetCore.CAP;
using Hangfire;
using LINGYUN.Abp.AspNetCore.HttpOverrides; using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AuditLogging.Elasticsearch; using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.Authorization.OrganizationUnits; using LINGYUN.Abp.Authorization.OrganizationUnits;
using LINGYUN.Abp.BackgroundJobs.Hangfire; using LINGYUN.Abp.BackgroundTasks.ExceptionHandling;
using LINGYUN.Abp.BackgroundWorkers.Hangfire; using LINGYUN.Abp.BackgroundTasks.Quartz;
using LINGYUN.Abp.Data.DbMigrator; using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.EventBus.CAP; using LINGYUN.Abp.EventBus.CAP;
using LINGYUN.Abp.ExceptionHandling.Notifications; using LINGYUN.Abp.ExceptionHandling.Notifications;
using LINGYUN.Abp.Hangfire.Storage.MySql;
using LINGYUN.Abp.Identity.WeChat; using LINGYUN.Abp.Identity.WeChat;
using LINGYUN.Abp.IM.SignalR; using LINGYUN.Abp.IM.SignalR;
using LINGYUN.Abp.Localization.CultureMap; using LINGYUN.Abp.Localization.CultureMap;
@ -21,6 +19,7 @@ using LINGYUN.Abp.Notifications.WeChat.MiniProgram;
using LINGYUN.Abp.Saas.EntityFrameworkCore; using LINGYUN.Abp.Saas.EntityFrameworkCore;
using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.Application;
using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.Serilog.Enrichers.UniqueId;
using LINGYUN.Abp.TaskManagement.EntityFrameworkCore;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
@ -37,9 +36,9 @@ using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore; using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore; using Volo.Abp.SettingManagement.EntityFrameworkCore;
namespace LY.MicroService.RealtimeMessage namespace LY.MicroService.RealtimeMessage;
{
[DependsOn( [DependsOn(
typeof(AbpSerilogEnrichersApplicationModule), typeof(AbpSerilogEnrichersApplicationModule),
typeof(AbpSerilogEnrichersUniqueIdModule), typeof(AbpSerilogEnrichersUniqueIdModule),
typeof(AbpAspNetCoreSerilogModule), typeof(AbpAspNetCoreSerilogModule),
@ -48,6 +47,9 @@ namespace LY.MicroService.RealtimeMessage
typeof(AbpMessageServiceApplicationModule), typeof(AbpMessageServiceApplicationModule),
typeof(AbpMessageServiceHttpApiModule), typeof(AbpMessageServiceHttpApiModule),
typeof(AbpIdentityWeChatModule), typeof(AbpIdentityWeChatModule),
typeof(AbpBackgroundTasksQuartzModule),
typeof(AbpBackgroundTasksExceptionHandlingModule),
typeof(TaskManagementEntityFrameworkCoreModule),
typeof(AbpMessageServiceEntityFrameworkCoreModule), typeof(AbpMessageServiceEntityFrameworkCoreModule),
typeof(AbpIdentityEntityFrameworkCoreModule), typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(AbpSaasEntityFrameworkCoreModule), typeof(AbpSaasEntityFrameworkCoreModule),
@ -57,9 +59,6 @@ namespace LY.MicroService.RealtimeMessage
typeof(AbpDataDbMigratorModule), typeof(AbpDataDbMigratorModule),
typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
typeof(AbpAuthorizationOrganizationUnitsModule), typeof(AbpAuthorizationOrganizationUnitsModule),
typeof(AbpHangfireMySqlStorageModule),
typeof(AbpBackgroundJobsHangfireModule),
typeof(AbpBackgroundWorkersHangfireModule),
typeof(AbpBackgroundWorkersModule), typeof(AbpBackgroundWorkersModule),
typeof(AbpIMSignalRModule), typeof(AbpIMSignalRModule),
typeof(AbpNotificationsSmsModule), typeof(AbpNotificationsSmsModule),
@ -72,8 +71,8 @@ namespace LY.MicroService.RealtimeMessage
typeof(AbpLocalizationCultureMapModule), typeof(AbpLocalizationCultureMapModule),
typeof(AbpAutofacModule) typeof(AbpAutofacModule)
)] )]
public partial class RealtimeMessageHttpApiHostModule : AbpModule public partial class RealtimeMessageHttpApiHostModule : AbpModule
{ {
private const string DefaultCorsPolicyName = "Default"; private const string DefaultCorsPolicyName = "Default";
public override void PreConfigureServices(ServiceConfigurationContext context) public override void PreConfigureServices(ServiceConfigurationContext context)
@ -82,8 +81,8 @@ namespace LY.MicroService.RealtimeMessage
PreConfigureApp(); PreConfigureApp();
PreConfigureFeature(); PreConfigureFeature();
PreCongifureHangfire();
PreConfigureCAP(configuration); PreConfigureCAP(configuration);
PreConfigureQuartz(configuration);
} }
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
@ -94,13 +93,13 @@ namespace LY.MicroService.RealtimeMessage
ConfigureDbContext(); ConfigureDbContext();
ConfigureLocalization(); ConfigureLocalization();
ConfigureJsonSerializer(); ConfigureJsonSerializer();
ConfigureBackgroundTasks();
ConfigreExceptionHandling(); ConfigreExceptionHandling();
ConfigureVirtualFileSystem(); ConfigureVirtualFileSystem();
ConfigureCaching(configuration); ConfigureCaching(configuration);
ConfigureAuditing(configuration); ConfigureAuditing(configuration);
ConfigureSwagger(context.Services); ConfigureSwagger(context.Services);
ConfigureMultiTenancy(configuration); ConfigureMultiTenancy(configuration);
ConfigureHangfireServer(context.Services);
ConfigureCors(context.Services, configuration); ConfigureCors(context.Services, configuration);
ConfigureSeedWorker(context.Services, hostingEnvironment.IsDevelopment()); ConfigureSeedWorker(context.Services, hostingEnvironment.IsDevelopment());
ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment());
@ -140,11 +139,7 @@ namespace LY.MicroService.RealtimeMessage
// 审计日志 // 审计日志
app.UseAuditing(); app.UseAuditing();
app.UseAbpSerilogEnrichers(); app.UseAbpSerilogEnrichers();
// 将在 2.0.0版本移除
// app.UseHangfireServer();
app.UseHangfireDashboard();
// 路由 // 路由
app.UseConfiguredEndpoints(); app.UseConfiguredEndpoints();
} }
}
} }

22
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/appsettings.Development.json

@ -25,6 +25,7 @@
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Messages;User Id=root;Password=123456", "Default": "Server=127.0.0.1;Database=Messages;User Id=root;Password=123456",
"MessageService": "Server=127.0.0.1;Database=Messages;User Id=root;Password=123456", "MessageService": "Server=127.0.0.1;Database=Messages;User Id=root;Password=123456",
"TaskManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456",
"AbpIdentity": "Server=127.0.0.1;Database=IdentityServer;User Id=root;Password=123456", "AbpIdentity": "Server=127.0.0.1;Database=IdentityServer;User Id=root;Password=123456",
"AbpSaas": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456", "AbpSaas": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456",
"AbpSettingManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456", "AbpSettingManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456",
@ -39,13 +40,19 @@
"Authority": "http://127.0.0.1:44385/", "Authority": "http://127.0.0.1:44385/",
"ApiName": "lingyun-abp-application" "ApiName": "lingyun-abp-application"
}, },
"Hangfire": { "Quartz": {
"MySql": { "UsePersistentStore": false,
"Connection": "Server=127.0.0.1;Database=Messages;User Id=root;Password=123456;Allow User Variables=true", "Properties": {
"TablePrefix": "AppHangfire" "quartz.jobStore.dataSource": "tkm",
}, "quartz.jobStore.type": "Quartz.Impl.AdoJobStore.JobStoreTX,Quartz",
"Dashboard": { "quartz.jobStore.driverDelegateType": "Quartz.Impl.AdoJobStore.MySQLDelegate,Quartz",
"WhiteList": "http://127.0.0.1:30000" "quartz.dataSource.tkm.connectionString": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456",
"quartz.dataSource.tkm.connectionStringName": "TaskManagement",
"quartz.dataSource.tkm.provider": "MySqlConnector",
"quartz.jobStore.clustered": "true",
"quartz.serializer.type": "json",
"quartz.scheduler.instanceName": "message-service",
"quartz.scheduler.instanceId": "3c36620a-d8c5-4c89-9828-78f33547751d"
} }
}, },
"Notifications": { "Notifications": {
@ -90,7 +97,6 @@
"Override": { "Override": {
"Microsoft.EntityFrameworkCore": "Warning", "Microsoft.EntityFrameworkCore": "Warning",
"DotNetCore.CAP": "Debug", "DotNetCore.CAP": "Debug",
"Hangfire.Server": "Warning",
"System": "Warning", "System": "Warning",
"Microsoft": "Warning", "Microsoft": "Warning",
"Microsoft.AspNetCore.SignalR": "Debug", "Microsoft.AspNetCore.SignalR": "Debug",

Loading…
Cancel
Save