redis定时

This commit is contained in:
qianjiawei
2023-11-22 14:33:16 +08:00
parent f84883811b
commit e35811b36d
2 changed files with 2 additions and 2 deletions

View File

@@ -220,7 +220,7 @@ namespace Tnb.ProductionMgr
}
public Task StartAsync(CancellationToken cancellationToken)
{
Readtimer = new Timer(GetRedisData, null, TimeSpan.Zero, TimeSpan.FromSeconds(5));
Readtimer = new Timer(GetRedisData, null, TimeSpan.Zero, TimeSpan.FromMinutes(5));
return Task.CompletedTask;
}
public Task StopAsync(CancellationToken cancellationToken)

View File

@@ -57,7 +57,7 @@ public class Startup : AppStartup
//定时任务
services.AddHostedService<TimedTaskBackgroundService>();
//services.AddHostedService<RedisBackGround>();
services.AddHostedService<RedisBackGround>();
}