From 4b4688538d084d0ee556770c9297b76197b1c487 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 1 Nov 2024 10:59:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=8D=E5=A4=8D=E9=82=AE?= =?UTF-8?q?=E4=BB=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Interceptor/DispatchDomainEventsInterceptor.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Infra.EFCore/Interceptor/DispatchDomainEventsInterceptor.cs b/IRaCIS.Core.Infra.EFCore/Interceptor/DispatchDomainEventsInterceptor.cs index 7ed87a5ef..c2daa786a 100644 --- a/IRaCIS.Core.Infra.EFCore/Interceptor/DispatchDomainEventsInterceptor.cs +++ b/IRaCIS.Core.Infra.EFCore/Interceptor/DispatchDomainEventsInterceptor.cs @@ -64,8 +64,12 @@ namespace IRaCIS.Core.Infra.EFCore.Interceptor //延迟调度的消息,比如1h后再消费 await _scheduler.SchedulePublish(DateTime.Now.AddSeconds((int)domainEvent.DelaySeconds!), (object)domainEvent); } + else + { + await _publishEndpoint.Publish(domainEvent.GetType(), domainEvent); + + } - await _publishEndpoint.Publish(domainEvent.GetType(), domainEvent); } }