Change default Lettuce command timeout to 10s.
This commit is contained in:
parent
42ea7a9814
commit
df90de3a5f
|
@ -16,7 +16,7 @@ public class RedisClusterConfiguration {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@NotNull
|
@NotNull
|
||||||
private Duration timeout = Duration.ofSeconds(2);
|
private Duration timeout = Duration.ofSeconds(10);
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
|
@ -56,11 +56,11 @@ public class FaultTolerantRedisCluster {
|
||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
FaultTolerantRedisCluster(final String name, final RedisClusterClient clusterClient, final Duration timeout, final CircuitBreakerConfiguration circuitBreakerConfiguration) {
|
FaultTolerantRedisCluster(final String name, final RedisClusterClient clusterClient, final Duration commandTimeout, final CircuitBreakerConfiguration circuitBreakerConfiguration) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
|
||||||
this.clusterClient = clusterClient;
|
this.clusterClient = clusterClient;
|
||||||
this.clusterClient.setDefaultTimeout(timeout);
|
this.clusterClient.setDefaultTimeout(commandTimeout);
|
||||||
|
|
||||||
this.stringConnection = clusterClient.connect();
|
this.stringConnection = clusterClient.connect();
|
||||||
this.binaryConnection = clusterClient.connect(ByteArrayCodec.INSTANCE);
|
this.binaryConnection = clusterClient.connect(ByteArrayCodec.INSTANCE);
|
||||||
|
|
Loading…
Reference in New Issue