mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 07:18:05 +01:00
Lazily evaluate jobs to give max concurrency meaningful "teeth"
This commit is contained in:
committed by
Chris Eager
parent
6142dcc7e6
commit
315fc00eac
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user