| | |
| | | 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); |
| | | List<Bus> busList = busService.selectInSts(BusStsType.RECEIVE, BusStsType.PROGRESS); |
| | | for (Bus bus : busList) { |
| | | mainService.allocateTask(bus); |
| | | } |
| | |
| | | for (Segment segment : segments) { |
| | | long startTime = System.currentTimeMillis(); |
| | | trafficService.trigger(segment); |
| | | log.info("traffic calculation spend {} ms", System.currentTimeMillis() - startTime); |
| | | // log.info("traffic calculation spend {} ms", System.currentTimeMillis() - startTime); |
| | | } |
| | | |
| | | } catch (Exception e) { |