| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (config.stationMaxTaskCount > 0 && currentStationTaskCount >= config.stationMaxTaskCount) { |
| | | News.warn("输送站点任务数量达到上限,已停止站点任务下发。当前任务数={},上限={}", currentStationTaskCount, config.stationMaxTaskCount); |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | |
| | | } |
| | | config.loopModeEnable = parseBoolean(loopModeValue, config.loopModeEnable); |
| | | |
| | | String stationMaxTaskCountValue = getConfigValue(systemConfigMap, "stationMaxTaskCountLimit"); |
| | | if (isBlank(stationMaxTaskCountValue)) { |
| | | stationMaxTaskCountValue = getConfigValue(systemConfigMap, "stationMaxTaskCount"); |
| | | } |
| | | if (isBlank(stationMaxTaskCountValue)) { |
| | | stationMaxTaskCountValue = getConfigValue(systemConfigMap, "conveyorStationTaskLimit"); |
| | | } |
| | | config.stationMaxTaskCount = parseInt(stationMaxTaskCountValue, config.stationMaxTaskCount); |
| | | |
| | | return config; |
| | | } |
| | | |
| | |
| | | private double circleMaxLoadLimit = 0.8d; |
| | | // 是否启用绕圈模式(仅启用时才生效承载限制) |
| | | private boolean loopModeEnable = false; |
| | | // 站点最大任务数量上限,0表示不限制 |
| | | private int stationMaxTaskCount = 30; |
| | | } |
| | | |
| | | private static class LoadGuardState { |