From 6633e261755ea67d44ab3807b383ef45a7263cb8 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 10 Apr 2026 14:24:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=90=AF=E5=8A=A8=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=EF=BC=8C=E7=9B=B4=E6=8E=A5=E8=B7=B3=E8=BF=87=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E4=BB=BB=E5=8A=A1=EF=BC=8C=E4=B8=8D=E5=BD=B1=E5=93=8D?= =?UTF-8?q?=E7=BA=BF=E4=B8=8A=E4=BB=BB=E5=8A=A1=EF=BC=8C=E5=90=A6=E5=88=99?= =?UTF-8?q?=E4=BC=9A=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRC.Core.SCP/HostConfig/SyncFileRecoveryService.cs | 7 +++++++ IRaCIS.Core.API/HostService/SyncFileRecoveryService.cs | 9 ++++++++- IRaCIS.Core.API/IRaCIS.Core.API.xml | 7 +++++++ .../Service/TrialSiteUser/DTO/TrialViewModel.cs | 2 +- 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/IRC.Core.SCP/HostConfig/SyncFileRecoveryService.cs b/IRC.Core.SCP/HostConfig/SyncFileRecoveryService.cs index 089465d10..d8e717be7 100644 --- a/IRC.Core.SCP/HostConfig/SyncFileRecoveryService.cs +++ b/IRC.Core.SCP/HostConfig/SyncFileRecoveryService.cs @@ -10,6 +10,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using System; using System.Linq; +using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; @@ -28,6 +29,12 @@ public class SyncFileRecoveryService(IServiceScopeFactory _scopeFactory, FileSyn /// protected override async Task ExecuteAsync(CancellationToken stoppingToken) { + //在本地调试的时候,不干涉部署同步任务 + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + return; + } + await Task.CompletedTask; diff --git a/IRaCIS.Core.API/HostService/SyncFileRecoveryService.cs b/IRaCIS.Core.API/HostService/SyncFileRecoveryService.cs index ad82da60d..e79796fec 100644 --- a/IRaCIS.Core.API/HostService/SyncFileRecoveryService.cs +++ b/IRaCIS.Core.API/HostService/SyncFileRecoveryService.cs @@ -9,6 +9,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using System; using System.Linq; +using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; @@ -27,7 +28,13 @@ public class SyncFileRecoveryService(IServiceScopeFactory _scopeFactory, FileSyn /// protected override async Task ExecuteAsync(CancellationToken stoppingToken) { - using var scope = _scopeFactory.CreateScope(); + //在本地调试的时候,不干涉部署同步任务 + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + return; + } + + using var scope = _scopeFactory.CreateScope(); var fileUploadRecordRepository = scope.ServiceProvider.GetRequiredService>(); // 延迟启动,保证主机快速启动 diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.xml b/IRaCIS.Core.API/IRaCIS.Core.API.xml index 16f69915e..7d1746658 100644 --- a/IRaCIS.Core.API/IRaCIS.Core.API.xml +++ b/IRaCIS.Core.API/IRaCIS.Core.API.xml @@ -344,6 +344,13 @@ + + + 多个程序,如果恢复同一份数据,造成重复同步,SCP服务不恢复任务 + + + + IPLimit限流 启动服务 diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs index ffcca6742..c0ba58eb3 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs @@ -266,7 +266,7 @@ namespace IRaCIS.Application.Contracts /// /// 打开失访可读 /// - public bool IsOpenLostVistRead { get; set; } = false; + public bool IsOpenLostVistRead { get; set; } = true;