This commit is contained in:
qianjiawei
2024-01-29 15:55:11 +08:00
parent 0cbce7c9fd
commit 878a800bc7
6 changed files with 97 additions and 18 deletions

View File

@@ -62,7 +62,7 @@ public class Startup : AppStartup
services.AddSingleton<BackgroundService, TimedTaskBackgroundService>(sp => new TimedTaskBackgroundService());
//var bgSvc = App.GetRequiredService<BackgroundService>();
//bgSvc.StartAsync(CancellationToken.None);
//services.AddHostedService<RedisBackGround>();
services.AddHostedService<RedisBackGround>();
}