/// <summary>
/// 这里要注意下，命名空间和程序集是一样的，不然反射不到
/// </summary>
namespace Tiobon.Core.Tasks;

/// <summary>
/// 牛尾同步培训讲师
/// </summary>
public class Job_Ushio_TrainTeacher_Sync_Quartz : JobBase, IJob
{
    private readonly IGhre_TeacherServices _ghre_TeacherServices;

    public Job_Ushio_TrainTeacher_Sync_Quartz(IGhre_TeacherServices ghre_TeacherServices, ITasksQzServices tasksQzServices, ITasksLogServices tasksLogServices)
        : base(tasksQzServices, tasksLogServices)
    {
        _ghre_TeacherServices = ghre_TeacherServices;
    }
    public async Task Execute(IJobExecutionContext context)
    {
        var executeLog = await ExecuteJob(context, async () => await Run(context));
    }
    public async Task Run(IJobExecutionContext context)
    {
        Console.WriteLine($"Job_Ushio_TrainTeacher_Sync_Quartz 执行 {DateTime.Now.ToShortTimeString()}");
        await _ghre_TeacherServices.Ushio_Sync();
    }
}
