用户登录、登出通知Wms定时服务的启动预关闭
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace Tnb.WarehouseMgr
|
||||
{
|
||||
public class ConditionalBackgroundService : IHostedService
|
||||
{
|
||||
private readonly IHostedService _backgroundService;
|
||||
//private readonly Func<bool> _condition;
|
||||
|
||||
public ConditionalBackgroundService(IHostedService backgroundService)
|
||||
{
|
||||
_backgroundService = backgroundService;
|
||||
}
|
||||
|
||||
public async Task StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
await _backgroundService.StartAsync(cancellationToken);
|
||||
}
|
||||
public async Task StopAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
await _backgroundService.StopAsync(cancellationToken);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -283,7 +283,6 @@ namespace Tnb.WarehouseMgr
|
||||
start = end;
|
||||
end = Math.Min((end + moveNum), arrary.Length);
|
||||
}
|
||||
|
||||
foreach (var arr in arrList)
|
||||
{
|
||||
for (int j = 1, len = arr.Length; j <= len; j++)
|
||||
|
||||
Reference in New Issue
Block a user