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

namespace YBEE.EQM.Application;

/// <summary>
/// 学生家长问卷填答进度同步作业
/// </summary>
public class ExamPatriarchQuestionnaireProgressSyncJob : IJob
{
    private readonly ILogger<ExamPatriarchQuestionnaireProgressSyncJob> _logger;
    private readonly IServiceScopeFactory _scopeFactory;

    public ExamPatriarchQuestionnaireProgressSyncJob(ILogger<ExamPatriarchQuestionnaireProgressSyncJob> logger, IServiceScopeFactory scopeFactory)
    {
        _logger = logger;
        _scopeFactory = scopeFactory;
    }

    public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)
    {
        using var serviceScope = _scopeFactory.CreateScope();

        //var examPatriarchQuestionnaireProgressSync = serviceScope.ServiceProvider.GetService<IExamPatriarchQuestionnaireProgressSync>();
        //await examPatriarchQuestionnaireProgressSync.Sync();
    }
}
