mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 04:02:09 +08:00
#ICGGAW redis数据源支持集群模式,修改校验
This commit is contained in:
@@ -119,7 +119,7 @@ public class RedisXmlELParser extends ClassXmlFlowELParser {
|
|||||||
if (redisParserVO.getRedisMode().equals(RedisMode.CLUSTER) && CollectionUtil.isEmpty(redisParserVO.getClusterNodeAddress())) {
|
if (redisParserVO.getRedisMode().equals(RedisMode.CLUSTER) && CollectionUtil.isEmpty(redisParserVO.getClusterNodeAddress())) {
|
||||||
throw new RedisException(StrFormatter.format(ERROR_MSG_PATTERN, "cluster address list"));
|
throw new RedisException(StrFormatter.format(ERROR_MSG_PATTERN, "cluster address list"));
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNull(redisParserVO.getScriptKey()) && ObjectUtil.isNull(redisParserVO.getScriptDataBase()) && !redisParserVO.getRedisMode().equals(RedisMode.CLUSTER)) {
|
if (ObjectUtil.isNotNull(redisParserVO.getScriptKey()) && ObjectUtil.isNull(redisParserVO.getScriptDataBase()) && !redisParserVO.getRedisMode().equals(RedisMode.CLUSTER)) {
|
||||||
throw new RedisException(StrFormatter.format(ERROR_MSG_PATTERN, "scriptDataBase"));
|
throw new RedisException(StrFormatter.format(ERROR_MSG_PATTERN, "scriptDataBase"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ public class RedisParserPollingMode implements RedisParserHelper {
|
|||||||
redisParserVO.getPollingInterval().longValue(), TimeUnit.SECONDS);
|
redisParserVO.getPollingInterval().longValue(), TimeUnit.SECONDS);
|
||||||
|
|
||||||
//如果有脚本
|
//如果有脚本
|
||||||
if (ObjectUtil.isNotNull(scriptClient) && (ObjectUtil.isNotNull(redisParserVO.getScriptDataBase()) || RedisMode.CLUSTER.getMode().equals(redisParserVO.getMode().getMode()))
|
if (ObjectUtil.isNotNull(scriptClient) && (ObjectUtil.isNotNull(redisParserVO.getScriptDataBase()) || RedisMode.CLUSTER.equals(redisParserVO.getRedisMode()))
|
||||||
&& StrUtil.isNotBlank(redisParserVO.getScriptKey())) {
|
&& StrUtil.isNotBlank(redisParserVO.getScriptKey())) {
|
||||||
//将lua脚本添加到scriptJedis脚本缓存
|
//将lua脚本添加到scriptJedis脚本缓存
|
||||||
String keyLuaOfScript = scriptClient.scriptLoad(luaOfKey);
|
String keyLuaOfScript = scriptClient.scriptLoad(luaOfKey);
|
||||||
|
|||||||
Reference in New Issue
Block a user