Creates an AsyncIterable of JobSettlement<J> from a sequence of jobs J
that you provide. It will manage the launching and tracking of your jobs
within the (e.g. concurrency, interval, timeout, retry) constraints defined
by your options.
Consume the resulting AsyncIterable with for await...of sequence or await sequence.next() to get the next settlement.
A JobSettlement<J> is equivalent to the values returned by
Promise.allSettled(). It will have either status:"fulfilled", value:Awaited<ReturnType<J>> or status:"rejected", reason:unknown.
However, it has an additional typed member job:J referencing the job which
is being settled. You can add arbitrary annotations to your jobs that will
help you when consuming settlements.
See documentation of NevermoreOptions for more on the available behaviours.
Creates an
AsyncIterable
ofJobSettlement<J>
from a sequence of jobsJ
that you provide. It will manage the launching and tracking of your jobs within the (e.g. concurrency, interval, timeout, retry) constraints defined by your options.Consume the resulting AsyncIterable with
for await...of sequence
orawait sequence.next()
to get the next settlement.A
JobSettlement<J>
is equivalent to the values returned byPromise.allSettled()
. It will have eitherstatus:"fulfilled", value:Awaited<ReturnType<J>>
orstatus:"rejected", reason:unknown
. However, it has an additional typed memberjob:J
referencing the job which is being settled. You can add arbitrary annotations to your jobs that will help you when consuming settlements.See documentation of NevermoreOptions for more on the available behaviours.