using Quartz;
using SlnMesnac.Business;
using SlnMesnac.Serilog;
using System;
using System.Threading.Tasks;

namespace SlnMesnac.Quartz.Job
{
    public class InspModeJob : IJob
    {

        public readonly SerilogHelper _logger;

        public readonly InspModeBusiness _inspModeBusiness;

        public InspModeJob(SerilogHelper logger, InspModeBusiness inspModeBusiness)
        {
            _logger = logger;
            _inspModeBusiness = inspModeBusiness;
        }

        public Task Execute(IJobExecutionContext context)
        {
            _logger.Info($"执行快速巡检任务：{DateTime.Now.ToString("HH:mm:ss")}");
            _inspModeBusiness.InspModeEvent();
            return Task.CompletedTask;
        }
    }
}
