维护数据根据发送端加锁
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2024-12-30 09:01:12 +08:00
parent b12079f8d9
commit aff1f5b599
1 changed files with 17 additions and 8 deletions

View File

@ -126,6 +126,13 @@ namespace IRaCIS.Core.SCP.Service
public async Task OnReceiveAssociationReleaseRequestAsync() public async Task OnReceiveAssociationReleaseRequestAsync()
{ {
var _distributedLockProvider = _serviceProvider.GetService<IDistributedLockProvider>();
var @lock = _distributedLockProvider.CreateLock($"{_upload.CallingAE}");
using (await @lock.AcquireAsync())
{
await DataMaintenanceAsaync(); await DataMaintenanceAsaync();
//记录监控 //记录监控
@ -137,6 +144,8 @@ namespace IRaCIS.Core.SCP.Service
await _SCPImageUploadRepository.AddAsync(_upload, true); await _SCPImageUploadRepository.AddAsync(_upload, true);
}
await SendAssociationReleaseResponseAsync(); await SendAssociationReleaseResponseAsync();
} }