package org.jeecg.config.init;

import org.jeecg.modules.diseaseAnalysis.algorithm.SingleConsumerLine;
import org.jeecg.modules.dynamicStaticAnalysis.algorithm.SingleConsumer;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * 系统初始化加载
 */
@Component
public class SystemInitRunner implements ApplicationRunner {
    @Override
    public void run(ApplicationArguments args) throws Exception {
        // 单独开启消费者线程
        new Thread(SingleConsumer::consume).start();
        //单独开启病害分析消费者线程
        new Thread(SingleConsumerLine::consume).start();
    }
}
