using Furion.Schedule;
using Microsoft.Extensions.DependencyInjection;
//using Microsoft.Extensions.Logging;

namespace YBEE.EQM.Application;

/// <summary>
/// 学生家长问卷填答进度同步作业
/// </summary>
//public class ExamPatriarchQuestionnaireProgressSyncJob(ILogger<ExamPatriarchQuestionnaireProgressSyncJob> logger, IServiceScopeFactory scopeFactory) : IJob
public class ExamPatriarchQuestionnaireProgressSyncJob(IServiceScopeFactory scopeFactory) : IJob
{
    public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)
    {
        using var serviceScope = scopeFactory.CreateScope();
        var examPatriarchQuestionnaireProgressSync = serviceScope.ServiceProvider.GetService<IExamPatriarchQuestionnaireProgressSync>();
        await examPatriarchQuestionnaireProgressSync.Sync();
    }
}
