From b714eda1465fa896b3e1218c1da79f8eb8e6d01d Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Thu, 12 Oct 2023 09:21:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Outgoing/TyrpOutgoingBackgroundWorker.cs | 2 +- .../Win_in.Sfs.Wms.DataExchange.Agent/OutgoingFromWmsWorker.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs index ad8de3990..a13d1ae38 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs @@ -29,7 +29,7 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase } - [UnitOfWork(true,isolationLevel:IsolationLevel.Serializable,50)] + [UnitOfWork(true,isolationLevel:IsolationLevel.ReadUncommitted, 50)] protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext) { Logger.LogInformation($"Starting: Handling {Outgoing}"); diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/OutgoingFromWmsWorker.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/OutgoingFromWmsWorker.cs index 561d04d32..45d3575ef 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/OutgoingFromWmsWorker.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/OutgoingFromWmsWorker.cs @@ -4,6 +4,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Volo.Abp.BackgroundWorkers; using Volo.Abp.Threading; +using Volo.Abp.Uow; using Win_in.Sfs.Store.Application.Contracts; using Win_in.Sfs.Wms.DataExchange.Domain; using IObjectMapper = Volo.Abp.ObjectMapping.IObjectMapper; @@ -23,7 +24,7 @@ public class OutgoingFromWmsWorker : AsyncPeriodicBackgroundWorkerBase _options = options.Value.OutgoingOptions; Timer.Period = options.Value.OutgoingOptions.PeriodSeconds * 1000; //default 5 minutes } - + [UnitOfWork] protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext) { //Resolve dependencies