using System;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using FMSAdmin.Services;
using FMSApp.Repositories;
using Quartz;

namespace FMSAdmin.QuartzSchedule.Jobs {
    public class AlarmLogPushJob : IJob {
        private readonly ILogger<AlarmLogPushJob> _logger;
        private readonly AlarmPointService _service;

        public AlarmLogPushJob(ILogger<AlarmLogPushJob> logger, AlarmPointService service) {
            _logger = logger;
            _service = service;
        }

        public Task Execute(IJobExecutionContext context) {
            _service.SendPush();
            return Task.CompletedTask;
        }
    }
}