using Microsoft.AspNetCore.SignalR;
using OASystem.API.OAMethodLib.Hub.HubClients;
using OASystem.API.OAMethodLib.Hub.Hubs;
using OASystem.API.OAMethodLib.Quartz.Business;
using OASystem.API.OAMethodLib.SignalR.Hubs;
using OASystem.Infrastructure.Repositories.PersonnelModule;
using Quartz;

namespace OASystem.API.OAMethodLib.Quartz.Jobs
{
    /// <summary>
    /// 任务消息推送
    /// 每天下午两点推送
    /// </summary>
    public class TaskNewsFeedJob : IJob
    {
        private readonly ILogger<TaskNewsFeedJob> _logger;

        public TaskNewsFeedJob(ILogger<TaskNewsFeedJob> logger)
        {
            _logger = logger;
        }
        /// <summary>
        /// 任务消息推送
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public async Task Execute(IJobExecutionContext context)
        {

            _logger.LogInformation("调用任务状态变更Function " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));

            //在此处编写任务业务代码
             TaskNotification.PostTaskMessageNotification();

            //return Task.CompletedTask;
        }
    }
}
