1
hutongqing
2025-01-02 8c6fd742db249ad4cc819cf041eb98d880a3ef73
WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzExtensions/QuartzJobHostedService.cs
@@ -34,6 +34,9 @@
namespace WIDESEAWCS_QuartzJob.QuartzExtensions
{
    /// <summary>
    /// 启动程序自动开启调度服务
    /// </summary>
    public class QuartzJobHostedService : IHostedService
    {
        private readonly ISchedulerCenter _schedulerCenter;
@@ -43,6 +46,9 @@
        private readonly IDeviceProtocolDetailService _deviceProtocolDetailService;
        private readonly QuartzNetExtension _quartzNetExtension;
        /// <summary>
        /// 启动程序自动开启调度服务
        /// </summary>
        public QuartzJobHostedService(ILogger<QuartzJobHostedService> logger, IDeviceInfoService deviceInfoService, IDispatchInfoService dispatchInfoService, ISchedulerCenter schedulerCenter, IDeviceProtocolDetailService deviceProtocolDetailService, QuartzNetExtension quartzNetExtension)
        {
            _logger = logger;
@@ -63,6 +69,9 @@
            await _quartzNetExtension.StartAsync();
        }
        /// <summary>
        /// 启动程序自动开启调度服务
        /// </summary>
        public Task StopAsync(CancellationToken cancellationToken)
        {
            _logger.LogInformation("Stop QuartzJob Service!");