using System;
using GxPress.Service.Interface.ElasticSearch;
using Quartz;
using Quartz.Spi;

namespace GxPress.Api.Tools
{
    public class JobFactory : IJobFactory
    {
        private readonly IServiceProvider container;
        private readonly IElasticSearchService elasticSearchService;
        public JobFactory(IServiceProvider container,IElasticSearchService elasticSearchService)
        {
            this.container = container;
            this.elasticSearchService=elasticSearchService;
        }
        public IJob NewJob(TriggerFiredBundle bundle, IScheduler scheduler)
        {
           return new MyJob(elasticSearchService);
        }
        public void ReturnJob(IJob job)
        {
        }
    }
}