| | |
| | | |
| | | @Scheduled(cron = "0/1 * * * * ? ") |
| | | private void startupBus() throws InterruptedException { |
| | | // if (!configService.getVal("TaskAssignMode", Boolean.class)) { return; } |
| | | if (!configService.getVal("TaskAssignMode", Boolean.class)) { return; } |
| | | if (!this.lock.tryLock(LOCK_TIMEOUT, TimeUnit.SECONDS)) { return; } |
| | | List<Bus> busList = busService.selectInSts(BusStsType.RECEIVE, BusStsType.PROGRESS); |
| | | for (Bus bus : busList) { |
| | |
| | | |
| | | @Scheduled(cron = "0/1 * * * * ? ") |
| | | private void calculateSeg() throws InterruptedException { |
| | | if (!configService.getVal("TaskAssignMode", Boolean.class)) { return; } |
| | | if (!this.lock.tryLock(LOCK_TIMEOUT, TimeUnit.SECONDS)) { return; } |
| | | List<Task> taskList = taskService.selectBySts(TaskStsType.WAITING); |
| | | |