From 7bf804a14330ed05a38b9966635ba64f12e4bbbe Mon Sep 17 00:00:00 2001 From: jruaux Date: Thu, 31 Oct 2024 19:21:08 -0700 Subject: [PATCH] fix: Added ssl args to RedisContext create method --- .../src/main/java/com/redis/riot/AbstractRedisCommand.java | 2 +- .../java/com/redis/riot/AbstractRedisExportCommand.java | 2 +- .../java/com/redis/riot/AbstractRedisImportCommand.java | 2 +- plugins/riot/src/main/java/com/redis/riot/RedisContext.java | 6 ++++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/riot/src/main/java/com/redis/riot/AbstractRedisCommand.java b/plugins/riot/src/main/java/com/redis/riot/AbstractRedisCommand.java index 03ca95dd..b71686dd 100644 --- a/plugins/riot/src/main/java/com/redis/riot/AbstractRedisCommand.java +++ b/plugins/riot/src/main/java/com/redis/riot/AbstractRedisCommand.java @@ -15,7 +15,7 @@ public abstract class AbstractRedisCommand extends AbstractJobCommand { @Override protected void execute() throws Exception { - redisContext = RedisContext.of(redisArgs.getUri(), redisArgs); + redisContext = RedisContext.of(redisArgs); redisContext.afterPropertiesSet(); try { super.execute(); diff --git a/plugins/riot/src/main/java/com/redis/riot/AbstractRedisExportCommand.java b/plugins/riot/src/main/java/com/redis/riot/AbstractRedisExportCommand.java index 391916a6..351e69d6 100644 --- a/plugins/riot/src/main/java/com/redis/riot/AbstractRedisExportCommand.java +++ b/plugins/riot/src/main/java/com/redis/riot/AbstractRedisExportCommand.java @@ -23,7 +23,7 @@ public abstract class AbstractRedisExportCommand extends AbstractExportCommand { @Override protected RedisContext sourceRedisContext() { - return RedisContext.of(redisArgs.getUri(), redisArgs); + return RedisContext.of(redisArgs); } protected ItemProcessor, Map> mapProcessor() { diff --git a/plugins/riot/src/main/java/com/redis/riot/AbstractRedisImportCommand.java b/plugins/riot/src/main/java/com/redis/riot/AbstractRedisImportCommand.java index ef04608f..1e282230 100644 --- a/plugins/riot/src/main/java/com/redis/riot/AbstractRedisImportCommand.java +++ b/plugins/riot/src/main/java/com/redis/riot/AbstractRedisImportCommand.java @@ -9,7 +9,7 @@ public abstract class AbstractRedisImportCommand extends AbstractImportCommand { @Override protected RedisContext targetRedisContext() { - return RedisContext.of(redisArgs.getUri(), redisArgs); + return RedisContext.of(redisArgs); } public RedisArgs getRedisArgs() { diff --git a/plugins/riot/src/main/java/com/redis/riot/RedisContext.java b/plugins/riot/src/main/java/com/redis/riot/RedisContext.java index e87a4325..546f4317 100644 --- a/plugins/riot/src/main/java/com/redis/riot/RedisContext.java +++ b/plugins/riot/src/main/java/com/redis/riot/RedisContext.java @@ -173,4 +173,10 @@ public RedisContext clientResources(ClientResources clientResources) { return this; } + public static RedisContext of(RedisArgs args) { + RedisContext context = of(args.getUri(), args); + context.sslOptions(args.getSslArgs().sslOptions()); + return context; + } + }