This repository was archived by the owner on May 19, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed
src/main/java/com/redislabs/springredisearch Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
2- <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
2+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
3+ xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
4+ xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
35 <modelVersion >4.0.0</modelVersion >
46
57 <parent >
2830 <id >java.net</id >
2931 <url >https://oss.sonatype.org/content/repositories/snapshots</url >
3032 </repository >
33+ <repository >
34+ <id >sonatype-snapshots</id >
35+ <name >Sonatype Snapshot Repository</name >
36+ <url >https://oss.sonatype.org/content/repositories/snapshots/</url >
37+ <snapshots >
38+ <enabled >true</enabled >
39+ </snapshots >
40+ </repository >
3141 </repositories >
3242
3343 <dependencies >
4050 <artifactId >lombok</artifactId >
4151 <optional >true</optional >
4252 </dependency >
53+ <dependency >
54+ <groupId >io.lettuce</groupId >
55+ <artifactId >lettuce-core</artifactId >
56+ <version >5.2.0.BUILD-SNAPSHOT</version >
57+ </dependency >
4358 <dependency >
4459 <groupId >com.redislabs</groupId >
4560 <artifactId >lettusearch</artifactId >
46- <version >1.0.0 </version >
61+ <version >1.0.3-SNAPSHOT </version >
4762 </dependency >
4863 <dependency >
4964 <groupId >org.springframework.boot</groupId >
Original file line number Diff line number Diff line change 1111import com .redislabs .lettusearch .RediSearchClient ;
1212import com .redislabs .lettusearch .StatefulRediSearchConnection ;
1313
14+ import io .lettuce .core .ClientOptions ;
1415import io .lettuce .core .RedisURI ;
1516import io .lettuce .core .resource .ClientResources ;
1617import io .lettuce .core .resource .DefaultClientResources ;
@@ -32,6 +33,7 @@ public class RediSearchConfiguration {
3233 private Integer port ;
3334 private String password ;
3435 private Duration timeout ;
36+ private boolean publishOnScheduler ;
3537
3638 @ Bean (destroyMethod = "shutdown" )
3739 ClientResources clientResources () {
@@ -49,7 +51,9 @@ RediSearchClient client(ClientResources clientResources) {
4951 if (timeout != null ) {
5052 redisURI .setTimeout (timeout );
5153 }
52- return RediSearchClient .create (clientResources , redisURI );
54+ RediSearchClient client = RediSearchClient .create (clientResources , redisURI );
55+ client .setOptions (ClientOptions .builder ().publishOnScheduler (publishOnScheduler ).build ());
56+ return client ;
5357 }
5458
5559 @ Bean (destroyMethod = "close" )
You can’t perform that action at this time.
0 commit comments