优化定时任务,移除Snowflake.Core包

This commit is contained in:
不做码农
2022-10-19 08:20:11 +08:00
parent 94c97edcfe
commit b52eaa6ae7
11 changed files with 35 additions and 41 deletions

View File

@@ -3,8 +3,6 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Quartz.Spi;
using System;
using System.Threading.Tasks;
using ZR.Service.System.IService;
using ZR.Tasks;
namespace ZR.Admin.WebApi.Extensions
@@ -38,7 +36,7 @@ namespace ZR.Admin.WebApi.Extensions
ITaskSchedulerServer _schedulerServer = app.ApplicationServices.GetRequiredService<ITaskSchedulerServer>();
//var tasks = _tasksQzService.GetList(m => m.IsStart);
var tasks = SqlSugar.IOC.DbScoped.SugarScope.Queryable<Model.System.SysTasksQz>().Where(m => m.IsStart).ToList();
var tasks = SqlSugar.IOC.DbScoped.SugarScope.Queryable<Model.System.SysTasks>().Where(m => m.IsStart).ToList();
//程序启动后注册所有定时任务
foreach (var task in tasks)