@@ -183,11 +183,11 @@ private String createHourDayAvg() {
183
183
CompletableFuture <String > future7 = CompletableFuture .supplyAsync (() -> {
184
184
this .createCbIntervalAvg (false );
185
185
return "createCbHourlyAvg() Done." ;
186
- }, CompletableFuture .delayedExecutor (10 , TimeUnit .SECONDS ));
186
+ }, CompletableFuture .delayedExecutor (1 , TimeUnit .SECONDS ));
187
187
CompletableFuture <String > future8 = CompletableFuture .supplyAsync (() -> {
188
188
this .createCbIntervalAvg (true );
189
189
return "createCbDailyAvg() Done." ;
190
- }, CompletableFuture .delayedExecutor (10 , TimeUnit .SECONDS ));
190
+ }, CompletableFuture .delayedExecutor (1 , TimeUnit .SECONDS ));
191
191
String combined = Stream .of (future7 , future8 ).map (CompletableFuture ::join ).collect (Collectors .joining (" " ));
192
192
LOG .info (combined );
193
193
}
@@ -204,13 +204,13 @@ private void processTimeFrame(MyTimeFrame timeFrame1, boolean isDay) {
204
204
// Coinbase
205
205
final var logFailed = String .format ("Coinbase prepare %s data failed" , isDay ? "day" : "hour" );
206
206
Mono <Collection <QuoteCb >> collectCb = this .myMongoRepository .find (query , QuoteCb .class )
207
- .timeout (Duration .ofSeconds (10L )).doOnError (ex -> LOG .warn (logFailed , ex ))
207
+ .timeout (Duration .ofSeconds (30L )).doOnError (ex -> LOG .warn (logFailed , ex ))
208
208
.onErrorResume (ex -> Mono .empty ()).subscribeOn (this .mongoScheduler ).collectList ()
209
209
.map (quotes -> this .createCbQuoteTimeFrame (timeFrame1 , isDay , quotes ));
210
210
collectCb .filter (Predicate .not (Collection ::isEmpty ))
211
211
.map (myColl -> this .countRelevantProperties (nonZeroProperties , myColl ))
212
212
.flatMap (myColl -> this .myMongoRepository .insertAll (Mono .just (myColl ), isDay ? CB_DAY_COL : CB_HOUR_COL )
213
- .timeout (Duration .ofSeconds (10L )).doOnError (ex -> LOG .warn (logFailed , ex ))
213
+ .timeout (Duration .ofSeconds (30L )).doOnError (ex -> LOG .warn (logFailed , ex ))
214
214
.onErrorResume (ex -> Mono .empty ()).subscribeOn (this .mongoScheduler ).collectList ())
215
215
.subscribeOn (this .mongoScheduler ).block ();
216
216
LOG .info (String .format ("Prepared Coinbase %s Data for: " , isDay ? "Day" : "Hour" )
0 commit comments