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;