Skip to content

JobRunner

Runs dispatched jobs once each: claimed at once, then proving, then submitted with the transaction; finalized comes from the settlement watch. Redispatches of a job already running are ignored; a reconnect re-reads unfinished jobs from the relay.

new JobRunner(client, handlers, onSubmitted?): JobRunner

Parameter Type
client RelayClient
handlers Partial<Record<JobDispatch["kind"], JobHandler>>
onSubmitted? (job, txId) => void

JobRunner

readonly client: RelayClient


readonly handlers: Partial<Record<JobDispatch["kind"], JobHandler>>


readonly optional onSubmitted?: (job, txId) => void

Parameter Type
job JobDispatch
txId string

void