| | |
| | | |
| | | private boolean sendSegmentWithRetry(StationCommand command) { |
| | | while (true) { |
| | | if (isTaskMoveReset(command == null ? null : command.getTaskNo())) { |
| | | return false; |
| | | } |
| | | CommandResponse commandResponse = commandSender.apply(command); |
| | | if (commandResponse == null) { |
| | | sleepQuietly(200L); |
| | |
| | | } |
| | | } |
| | | |
| | | private boolean isTaskMoveReset(Integer taskNo) { |
| | | if (taskNo == null || redisUtil == null) { |
| | | return false; |
| | | } |
| | | Object cancel = redisUtil.get(RedisKeyType.DEVICE_STATION_MOVE_RESET.key + taskNo); |
| | | return cancel != null; |
| | | } |
| | | |
| | | private double loadSegmentAdvanceRatio() { |
| | | try { |
| | | ConfigService configService = SpringUtils.getBean(ConfigService.class); |