本地启动项目,直接跳过同步任务,不影响线上任务,否则会重复
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
6c1c46601c
commit
6633e26175
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
|||
/// <returns></returns>
|
||||
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<IRepository<FileUploadRecord>>();
|
||||
|
||||
// 延迟启动,保证主机快速启动
|
||||
|
|
|
|||
|
|
@ -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限流 启动服务
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ namespace IRaCIS.Application.Contracts
|
|||
/// <summary>
|
||||
/// 打开失访可读
|
||||
/// </summary>
|
||||
public bool IsOpenLostVistRead { get; set; } = false;
|
||||
public bool IsOpenLostVistRead { get; set; } = true;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue