This commit is contained in:
alex
2023-08-04 11:27:35 +08:00
4 changed files with 20 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ namespace Tnb.WarehouseMgr
/// 定时任务
/// added by ly on 20230802
/// </summary>
public class TimedTaskBackgroundService : BackgroundService
public class TimedTaskBackgroundService : IHostedService
{
private ISendMessageService? _sendService;
@@ -50,8 +50,6 @@ namespace Tnb.WarehouseMgr
TimedTask(cts => setSortingService.PackSortingByAdd(cts), setSortingCts, toUserIds);
});
}
private Task TimedTask(Func<CancellationTokenSource, Task> action, CancellationTokenSource cts, List<string>? toUserIds = default)
{
var token = cts.Token;