reactor-core/src/main/java/reactor/core/publisher/Flux.java
public final Flux<T> doOnTerminate(Runnable onTerminate) {
		Objects.requireNonNull(onTerminate, "onTerminate");
		return doOnSignal(this,
				null,
				null,
				e -> onTerminate.run(),
				onTerminate,
				null,
				null,
				null);
	}
public final Flux<T> doOnTerminate(Runnable onTerminate) {
		Objects.requireNonNull(onTerminate, "onTerminate");
		return doOnSignal(this,
				null,
				null,
				e -> onTerminate.run(),
				onTerminate,
				null,
				null,
				null);
	}
Add behavior (side-effect) triggered when the {@link Flux} terminates, either by
completing successfully or with an error.
<p>
<img class="marble" src="doc-files/marbles/doOnTerminateForFlux.svg" alt="">

@param onTerminate the callback to call on {@link Subscriber#onComplete} or {@link Subscriber#onError}

@return an observed  {@link Flux}