wanshenmean
2 天以前 4b483d9d06bead231b88ca212fd799196668a057
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/BackgroundServices/AutoOutboundTaskBackgroundService.cs
@@ -1,9 +1,4 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System;
using System.Threading;
using System.Threading.Tasks;
using WIDESEA_Core.Core;
using WIDESEA_ITaskInfoService;
@@ -41,11 +36,18 @@
            _logger.LogInformation("自动出库任务检查间隔: {Seconds} 秒", _options.CheckIntervalSeconds);
            int index = 0;
            while (!stoppingToken.IsCancellationRequested)
            {
                try
                {
                    _logger.LogDebug("开始检查到期库存...");
                    _logger.LogInformation("开始检查到期库存...");
                    if (index == 0)
                    {
                        await Task.Delay(5000, stoppingToken);
                        index++;
                    }
                    var result = await _taskService.CreateAutoOutboundTasksAsync();
                    if (result.Status)
@@ -76,4 +78,4 @@
            await base.StopAsync(cancellationToken);
        }
    }
}
}