Class DurableJobStore

java.lang.Object
com.kingsrook.qqq.backend.core.jobs.store.DurableJobStore

public class DurableJobStore extends Object
The durable job store, over the jobs_* tables, on any backend with the CONDITIONAL_UPDATE capability. Every state change that two pods could race on is a compare-and-set through ConditionalUpdateAction: - claim: chunk PENDING/RETRY -> RUNNING, guarded by leaseVersion; - heartbeat, checkpoint, complete, fail, release: guarded by the lease token and status RUNNING (fencing - a reclaimed lease's writes change 0 rows); - reap: RUNNING with an expired lease -> RETRY/FAILED/NEEDS_REVIEW, guarded by leaseVersion; - job status: guarded by the expected current statuses. Lease times come from the database clock. All methods run as the system user (the kernel's own bookkeeping), never as the job's user.