本地启动项目,直接跳过同步任务,不影响线上任务,否则会重复
continuous-integration/drone/push Build is passing Details

Test_IRC_Net8
hang 2026-04-10 14:24:56 +08:00
parent 6c1c46601c
commit 6633e26175
4 changed files with 23 additions and 2 deletions

View File

@ -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
/// <returns></returns>
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
//在本地调试的时候,不干涉部署同步任务
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return;
}
await Task.CompletedTask;

View File

@ -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,6 +28,12 @@ public class SyncFileRecoveryService(IServiceScopeFactory _scopeFactory, FileSyn
/// <returns></returns>
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
//在本地调试的时候,不干涉部署同步任务
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return;
}
using var scope = _scopeFactory.CreateScope();
var fileUploadRecordRepository = scope.ServiceProvider.GetRequiredService<IRepository<FileUploadRecord>>();

View File

@ -344,6 +344,13 @@
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.API.HostService.SyncFileRecoveryService.ExecuteAsync(System.Threading.CancellationToken)">
<summary>
多个程序如果恢复同一份数据造成重复同步SCP服务不恢复任务
</summary>
<param name="stoppingToken"></param>
<returns></returns>
</member>
<member name="T:IRaCIS.Core.API.IpPolicyRateLimitSetup">
<summary>
IPLimit限流 启动服务

View File

@ -266,7 +266,7 @@ namespace IRaCIS.Application.Contracts
/// <summary>
/// 打开失访可读
/// </summary>
public bool IsOpenLostVistRead { get; set; } = false;
public bool IsOpenLostVistRead { get; set; } = true;