File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
vault/src/main/java/io/scalecube/security/vault Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change 12
12
import org .slf4j .Logger ;
13
13
import org .slf4j .LoggerFactory ;
14
14
import reactor .core .publisher .Mono ;
15
+ import reactor .core .scheduler .Schedulers ;
15
16
16
17
public final class VaultClientTokenSupplier {
17
18
@@ -87,6 +88,7 @@ public VaultClientTokenSupplier vaultRole(String vaultRole) {
87
88
public Mono <String > getToken () {
88
89
return Mono .fromRunnable (this ::validate )
89
90
.then (Mono .fromCallable (this ::getToken0 ))
91
+ .subscribeOn (Schedulers .boundedElastic ())
90
92
.doOnSuccess (s -> LOGGER .debug ("[getToken][success] result: {}" , mask (s )))
91
93
.doOnError (th -> LOGGER .error ("[getToken][error] cause: {}" , th .toString ()));
92
94
}
Original file line number Diff line number Diff line change 14
14
import org .slf4j .LoggerFactory ;
15
15
import reactor .core .Exceptions ;
16
16
import reactor .core .publisher .Mono ;
17
+ import reactor .core .scheduler .Schedulers ;
17
18
18
19
public final class VaultServiceTokenSupplier {
19
20
@@ -107,6 +108,7 @@ public VaultServiceTokenSupplier serviceTokenNameBuilder(
107
108
public Mono <String > getToken (Map <String , String > tags ) {
108
109
return Mono .fromRunnable (this ::validate )
109
110
.then (Mono .defer (() -> vaultTokenSupplier ))
111
+ .subscribeOn (Schedulers .boundedElastic ())
110
112
.flatMap (
111
113
vaultToken -> {
112
114
final String uri = buildServiceTokenUri (tags );
You can’t perform that action at this time.
0 commit comments