Quartz更改,使用内置注册

This commit is contained in:
陈淳
2022-12-13 23:12:10 +08:00
parent d34c9818b4
commit f7c74b5c96
2 changed files with 1 additions and 34 deletions

View File

@@ -8,7 +8,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Yi.Framework.Core;
using Yi.Framework.Core.Quartz;
namespace Yi.Framework.WebCore.MiddlewareExtend
{
@@ -25,7 +24,7 @@ namespace Yi.Framework.WebCore.MiddlewareExtend
public static IServiceCollection AddQuartzService(this IServiceCollection services)
{
services.AddSingleton<QuartzInvoker>();
services.AddSingleton<IJobFactory, MyQuartzFactory>();
services.AddQuartz();
services.AddSingleton<ISchedulerFactory, StdSchedulerFactory>();
return services;
}