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

/// <summary>
/// 牛尾同步培训需求
/// </summary>
public class Job_Ushio_TrainRequest_Sync_Quartz : JobBase, IJob
{
    private readonly IGhre_RequestServices _ghre_RequestServices;

    public Job_Ushio_TrainRequest_Sync_Quartz(IGhre_RequestServices ghre_RequestServices, ITasksQzServices tasksQzServices, ITasksLogServices tasksLogServices)
        : base(tasksQzServices, tasksLogServices)
    {
        _ghre_RequestServices = ghre_RequestServices;
    }
    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_TrainRequest_Sync_Quartz 执行 {DateTime.Now.ToShortTimeString()}");
        await _ghre_RequestServices.Ushio_Sync();
    }
}
