Protocol
Job
A task that can be queued for future execution.
protocol Job : AnyJob
Topics
Associated Types
associatedtype Payload : SendableThe data associated with a job
Instance Methods
func dequeue(QueueContext, Self.Payload) -> EventLoopFuture<Void>Called when it’s this Job’s turn to be dequeued.func error(QueueContext, any Error, Self.Payload) -> EventLoopFuture<Void>Called when there is an error at any stage of the Job’s execution.func nextRetryIn(attempt: Int) -> IntCalled when there was an error and the job will be retried.
Type Methods
static func parsePayload([UInt8]) throws -> Self.PayloadDeserialize an array of bytes into a typed payload. WhenPayloadisCodable, this method will default to decoding from JSON.static func serializePayload(Self.Payload) throws -> [UInt8]Serialize a typed payload to an array of bytes. WhenPayloadisCodable, this method will default to encoding to JSON.
Relationships
Inherits From
AnyJobSwift.SendableSwift.SendableMetatype