public void OnChanged(QuartzOptions options, QuartzOptions oldOptions)
 {
     if (!options.Enabled && oldOptions.Enabled)
     {
         _server.Stop();
     }
     else if (options.Enabled && !oldOptions.Enabled)
     {
         _server.Start(options.GetQuartzProps());
     }
     else if (options.Enabled && oldOptions.Enabled && HasChanged(options, oldOptions))
     {
         _server.Stop();
         _server.Start(options.GetQuartzProps());
     }
 }
Ejemplo n.º 2
0
 public void OnChanged(QuartzConfig newConfig, QuartzConfig oldConfig)
 {
     _quartzServer.Stop();
     if (newConfig.Enabled)
     {
         _quartzServer.Restart();
     }
 }
        public async Task Handle()
        {
            if (_server != null)
            {
                await _server.Stop();

                _logger.LogDebug("quartz server stop");
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Stop this service.
 /// </summary>
 protected override void OnStop()
 {
     logger.Debug("Stopping service");
     server.Stop();
     logger.Debug("Service stopped");
 }
Ejemplo n.º 5
0
 protected override void OnStop()
 {
     server.Stop();
 }