ExamPatriarchQuestionnaireProgressSyncJob.cs 1023 B

12345678910111213141516171819202122232425262728
  1. using Furion.Schedule;
  2. using Microsoft.Extensions.DependencyInjection;
  3. using Microsoft.Extensions.Logging;
  4. namespace YBEE.EQM.Application;
  5. /// <summary>
  6. /// 学生家长问卷填答进度同步作业
  7. /// </summary>
  8. public class ExamPatriarchQuestionnaireProgressSyncJob : IJob
  9. {
  10. private readonly ILogger<ExamPatriarchQuestionnaireProgressSyncJob> _logger;
  11. private readonly IServiceScopeFactory _scopeFactory;
  12. public ExamPatriarchQuestionnaireProgressSyncJob(ILogger<ExamPatriarchQuestionnaireProgressSyncJob> logger, IServiceScopeFactory scopeFactory)
  13. {
  14. _logger = logger;
  15. _scopeFactory = scopeFactory;
  16. }
  17. public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)
  18. {
  19. using var serviceScope = _scopeFactory.CreateScope();
  20. //var examPatriarchQuestionnaireProgressSync = serviceScope.ServiceProvider.GetService<IExamPatriarchQuestionnaireProgressSync>();
  21. //await examPatriarchQuestionnaireProgressSync.Sync();
  22. }
  23. }