fix 超时设置
This commit is contained in:
@@ -9,17 +9,17 @@ namespace Dlhis.ScheduledTask.Jobs;
|
||||
[RecurringJob(nameof(OutsourceAutoResignJob), "0 0 1 1/1 * ? ", Name = "自动处理外包离职")]
|
||||
public class OutsourceAutoResignJob : BaseJob
|
||||
{
|
||||
private readonly IGainfoApi _gainfoApi;
|
||||
private readonly ISyncApi _syncApi;
|
||||
|
||||
/// <inheritdoc />
|
||||
public OutsourceAutoResignJob(IServiceProvider serviceProvider, IGainfoApi gainfoApi) : base(serviceProvider)
|
||||
public OutsourceAutoResignJob(IServiceProvider serviceProvider, ISyncApi syncApi) : base(serviceProvider)
|
||||
{
|
||||
_gainfoApi = gainfoApi;
|
||||
_syncApi = syncApi;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override async Task RunAsync(IServiceProvider serviceProvider)
|
||||
{
|
||||
await _gainfoApi.OutsourceAutoResignAsync();
|
||||
await _syncApi.OutsourceAutoResignAsync();
|
||||
}
|
||||
}
|
||||
@@ -26,13 +26,13 @@ public class SyncPersonJob : BaseJob
|
||||
{
|
||||
if (!werk.BackgroundJobKey.IsEmpty())
|
||||
{
|
||||
var jobKey = BackgroundJob.Enqueue<ISyncApi>(x => x.SyncGainfoByWerkAsync(werk.Werk));
|
||||
werk.BackgroundJobKey = jobKey;
|
||||
await DbContext.UpdateAsync(werk);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
var jobKey = BackgroundJob.Enqueue<ISyncApi>(x => x.SyncGainfoByWerkAsync(werk.Werk));
|
||||
werk.BackgroundJobKey = jobKey;
|
||||
await DbContext.UpdateAsync(werk);
|
||||
|
||||
Logger.LogInformation("SAP创建人事范围{werk}后台调度任务", werk.Werk);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user