package com.zehong.framework.config.properties;

import com.zehong.system.task.DeviceTaskScheduler;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author lenovo
 * @date 2025/9/23
 * @description TODO
 */
@Component
public class QuartzStartupListener implements ApplicationListener<ApplicationReadyEvent> {
    private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(QuartzStartupListener.class);

    @Resource
    private DeviceTaskScheduler deviceTaskScheduler;

    @Override
    public void onApplicationEvent(ApplicationReadyEvent event) {
        log.info("应用启动完成，检查Quartz任务状态...");
        // 这里可以添加需要自动恢复的任务检查逻辑
    }
}
