Lazily evaluate jobs to give max concurrency meaningful "teeth"

This commit is contained in:
Jon Chambers
2024-09-20 17:36:24 -04:00
committed by Chris Eager
parent 6142dcc7e6
commit 315fc00eac

View File

@@ -153,7 +153,7 @@ public abstract class JobScheduler {
? item.get(ATTR_JOB_DATA).b().asByteArray()
: null;
return Mono.fromFuture(processJob(jobData))
return Mono.fromFuture(() -> processJob(jobData))
.doOnNext(outcome -> Metrics.counter(PROCESS_JOB_COUNTER_NAME,
SCHEDULER_NAME_TAG, getSchedulerName(),
OUTCOME_TAG, outcome)