#
luxiaotao1123
2024-10-19 0b94d05ceb5aa612d1c594bb43bcb283817c1943
#
1个文件已修改
4 ■■■■ 已修改文件
zy-acs-manager/src/main/java/com/zy/acs/manager/core/scheduler/KernelScheduler.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/java/com/zy/acs/manager/core/scheduler/KernelScheduler.java
@@ -14,6 +14,7 @@
import com.zy.acs.manager.manager.service.BusService;
import com.zy.acs.manager.manager.service.SegmentService;
import com.zy.acs.manager.manager.service.TaskService;
import com.zy.acs.manager.system.service.ConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
@@ -48,9 +49,12 @@
    private SegmentService segmentService;
    @Autowired
    private TrafficService trafficService;
    @Autowired
    private ConfigService configService;
    @Scheduled(cron = "0/3 * * * * ? ")
    private void startupBus() throws InterruptedException {
        if (!configService.getVal("TaskAssignMode", Boolean.class)) { return; }
        if (!this.lock.tryLock(LOCK_TIMEOUT, TimeUnit.SECONDS)) { return; }
        List<Bus> busList = busService.selectBySts(BusStsType.RECEIVE);
        for (Bus bus : busList) {