Skip to content

Instance Method

dispatch(_:_:maxRetryCount:delayUntil:id:)

Dispatch a job into the queue for processing
func dispatch<J>(_ job: J.Type, _ payload: J.Payload, maxRetryCount: Int = 0, delayUntil: Date? = nil, id: JobIdentifier = .init()) -> EventLoopFuture<Void> where J : Job

Parameters

job

The Job type

payload

The payload data to be dispatched

maxRetryCount

Number of times to retry this job on failure

delayUntil

Delay the processing of this job until a certain date