using Infrastructure; using OpenAuth.App.ServiceApp.FireManagement; using Quartz; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace OpenAuth.App.Jobs { public class YingJiJuJob : IJob { private SysLogApp _sysLogApp; private OpenJobApp _openJobApp; private FireCodeH5App _fireCodeH5App; public YingJiJuJob(SysLogApp sysLogApp, OpenJobApp openJobApp, FireCodeH5App fireCodeH5App) { _sysLogApp = sysLogApp; _openJobApp = openJobApp; _fireCodeH5App = fireCodeH5App; } public async Task Execute(IJobExecutionContext context) { var jobId = context.MergedJobDataMap.GetString(Define.JOBMAPKEY); //todo:这里可以加入自己的自动任务逻辑 await _fireCodeH5App.GetFireInfoAsync(); _openJobApp.RecordRun(jobId); //return Task.Delay(1); } } }