package com.taais.biz.component;

import com.taais.biz.controller.TargetIdentificationTaskController;
import com.taais.biz.service.IAlgorithmTaskService;
import com.taais.biz.service.impl.TargetIdentificationTaskServiceImpl;
import jakarta.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class ScheduledTasks {
    private static final Logger log = LoggerFactory.getLogger(ScheduledTasks.class);

    @Resource
    IAlgorithmTaskService algorithmTaskService;

    @Resource
    TargetIdentificationTaskServiceImpl targetIdentificationTaskService;

    //@Scheduled(fixedRate = 10000)
    //public void runTask() {
    //    log.info("ScheduledTasks.runTask start");
    //    algorithmTaskService.taskRun();
    //    log.info("ScheduledTasks.runTask end");
    //}

    //@Scheduled(fixedRate = 30000000)
    //public void taskRun() {
    //    try {
    //        log.info("ScheduledTasks.taskRun start");
    //        targetIdentificationTaskService.taskRun();
    //        log.info("ScheduledTasks.taskRun end");
    //    } catch (Exception e) {
    //        log.error("ScheduledTasks.taskRun error", e);
    //    }
    //}
}
