推拉定时任务

This commit is contained in:
李鹏军 2024-03-21 14:50:04 +08:00
parent 4b189b378d
commit 7f0f11d0a3
2 changed files with 3 additions and 1 deletions

View File

@ -102,7 +102,7 @@ public class TrackPullService : ApplicationService
GlobalConst.TrackRefreshSubscribe, JsonConvert.SerializeObject(group.Key));
}
await RedisHelper.Client.SetExAsync(redisKey, config.PullInterval * 60, 1);
await RedisHelper.Client.SetExAsync(redisKey, config.PullInterval * 60, orders.Count);
}

View File

@ -1,4 +1,5 @@
using DotNetCore.CAP;
using Microsoft.AspNetCore.Authorization;
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using SJZY.Track.Application.Contract.Events;
using SJZY.Track.Application.Contract.Services;
@ -107,6 +108,7 @@ public class TrackPushService : ApplicationService
/// 定时任务推送预警(》12小时没有推送的)
/// </summary>
/// <returns></returns>
[AllowAnonymous]
[HttpPost("Track/PushWarnForTask")]
public async Task<string> PushWarnForTaskAsync()
{