ClaimedJob

data class ClaimedJob(val id: JobId, val kind: String, val payload: String, val payloadVersion: Int, val queue: QueueName, val attempt: Int, val enqueuedAt: Instant, val scheduledFor: Instant, val leaseUntil: Instant, val fence: Long, val scheduleId: String? = null)

A job claimed under a lease, with everything a worker needs to execute it.

Constructors

Link copied to clipboard
constructor(id: JobId, kind: String, payload: String, payloadVersion: Int, queue: QueueName, attempt: Int, enqueuedAt: Instant, scheduledFor: Instant, leaseUntil: Instant, fence: Long, scheduleId: String? = null)

Properties

Link copied to clipboard

1-based attempt number of the execution about to happen.

Link copied to clipboard
Link copied to clipboard
val fence: Long

Fencing token: increases every time this job is claimed. Stores must reject writes (transition, heartbeat) carrying a stale fence, so a zombie worker resurrected after a pause cannot overwrite newer state.

Link copied to clipboard
val id: JobId
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Id of the recurring schedule that emitted this run; null for directly enqueued jobs.