Skip to content

Commit

Permalink
Fix init skipped with clusters only
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienlauer committed May 19, 2021
1 parent 8c1a317 commit ea6a3d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Version 2.1.1 (2021-05-19)

* [fix] Initialization was completely skipped when only Jedis clusters were configured.

# Version 2.1.0 (2021-05-06)

* [new] Support cluster mode for Redis through `JedisCluster` configuration and injection.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<groupId>org.seedstack.addons.redis</groupId>
<artifactId>redis</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>

<properties>
<seed.version>3.12.0</seed.version>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/seedstack/redis/internal/RedisPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public Collection<ClasspathScanRequest> classpathScanRequests() {
public InitState initialize(InitContext initContext) {
RedisConfig redisConfig = getConfiguration(RedisConfig.class);

if (redisConfig.getClients().isEmpty()) {
LOGGER.info("No Redis client configured, Redis support disabled");
if (redisConfig.getClients().isEmpty() && redisConfig.getClusters().isEmpty()) {
LOGGER.info("No Redis client or cluster configured, Redis support disabled");
return InitState.INITIALIZED;
}

Expand Down

0 comments on commit ea6a3d1

Please sign in to comment.