Skip to content

Commit

Permalink
Removed questionable subscribeOn() (#271, #290)
Browse files Browse the repository at this point in the history
  • Loading branch information
climategadgets committed Oct 8, 2023
1 parent d74dade commit 883bd0c
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.apache.logging.log4j.ThreadContext;
import reactor.core.publisher.Flux;
import reactor.core.publisher.FluxSink;
import reactor.core.scheduler.Schedulers;

import java.util.concurrent.CountDownLatch;

Expand Down Expand Up @@ -121,7 +120,6 @@ protected final void initFluxes(Flux<Signal<Double, Void>> ambientFlux) {
// Just get the (indoor, ambient) pair flux with no nulls or errors
var stage1 = Flux
.create(this::connectCombined)
.subscribeOn(Schedulers.boundedElastic())
.doOnNext(pair -> logger.trace("{}: raw indoor={}, ambient={}", getAddress(), pair.getLeft(), pair.getRight()))
.filter(pair -> pair.getLeft() != null && pair.getRight() != null)
.filter(pair -> !pair.getLeft().isError() && !pair.getRight().isError())
Expand All @@ -142,7 +140,6 @@ protected final void initFluxes(Flux<Signal<Double, Void>> ambientFlux) {
.subscribe();

ambientFlux
.subscribeOn(Schedulers.boundedElastic())
.doOnNext(this::recordAmbient)

// VT: NOTE: Careful when testing, this will consume everything thrown at it immediately
Expand Down

0 comments on commit 883bd0c

Please sign in to comment.