定时服务启动方式调整,并调整相关业务代码
This commit is contained in:
@@ -39,6 +39,7 @@ namespace Tnb.WarehouseMgr
|
||||
/// </summary>
|
||||
public class TimedTaskBackgroundService : BackgroundService
|
||||
{
|
||||
public bool IsStarted { get; set; }
|
||||
private IEventPublisher _eventPublisher = default!;
|
||||
private readonly IServiceProvider _serviceProvider;
|
||||
private static Dictionary<string, Func<CancellationTokenSource?, Task>> _timedFuncMap = new(StringComparer.OrdinalIgnoreCase);
|
||||
@@ -59,6 +60,7 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
protected override Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
{
|
||||
IsStarted = true;
|
||||
var queueTask = Task.Run(async () =>
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user