Lazily evaluate jobs to give max concurrency meaningful "teeth"

This commit is contained in:
Jon Chambers authored and Chris Eager committed 2024-09-23 08:43:44 -05:00
1 parent 6142dcc7e6
commit 315fc00eac
1 file changed
+1 -1
@@ -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)