Esempio n. 1
0
        /// <summary>
        ///   Gaia schedulerl service plugin constructor
        /// </summary>
        public SchedulerPlugin()
        {
            _logger = new Logger <SchedulerPlugin>(new LoggerFactory());
            var jobFactory = new IoCJobFactory(Container.Instance);

            _schedulerFactory = new IoCSchedulerFactory(jobFactory);
        }
Esempio n. 2
0
        /// <summary>
        ///   Gaia schedulerl service plugin constructor
        /// </summary>
        public SchedulerPlugin()
        {
            _logger = LogManager.GetLogger(GetType());
            var jobFactory = new IoCJobFactory(Container.Instance);

            _schedulerFactory = new IoCSchedulerFactory(jobFactory);
        }
Esempio n. 3
0
        public static async void AddQuartz(this IServiceCollection services)
        {
            var props = new NameValueCollection
            {
                { "quartz.serializer.type", "json" }
            };
            var factory   = new StdSchedulerFactory(props);
            var scheduler = await factory.GetScheduler();

            var jobFactory = new IoCJobFactory(services.BuildServiceProvider());

            scheduler.JobFactory = jobFactory;
            await scheduler.Start();

            services.AddSingleton(scheduler);
        }