package cn.wise.sc.energy.power.plant.business.task;

import cn.wise.sc.energy.power.plant.business.constant.Constance;
import cn.wise.sc.energy.power.plant.business.jna.C2TreeAnalysis;
import cn.wise.sc.energy.power.plant.business.task.schedule.ScheduleTask;
import cn.wise.sc.energy.power.plant.business.utils.Utils;
import org.springframework.stereotype.Service;

import java.util.UUID;

/**
 * @author neo.shu
 * @since 2020/10/15 18:05
 */

@Service
public class C2TreeAnalysisTask extends ScheduleTask {

    public C2TreeAnalysisTask() {
        super(UUID.randomUUID().toString());
    }

    @Override
    public void run() {
        try {
            C2TreeAnalysis.INSTANCE.C2TreeDiagnose(Constance.TASKPARAMMAP.get(Utils.getTaskPrefix()));
            Thread.sleep(10000);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
