Skip to content

app.job_queue

TableRow level security on

Background jobs (Section 7.3). Workers claim ready jobs with app.claim_jobs, which skips locked rows so two workers never run one job, and report through app.finish_job, which retries with exponential backoff.

Primary key: id

Columns of app.job_queue
ColumnTypeNullableDescription
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org. A row never moves to another org.References app.organizations.id
job_kindtextNoWhat the job does.References private.job_kinds.code
subject_iduuidNoRow of the job kind's subject table the job works on.
job_statusapp.job_statusNoQueued, Running, Succeeded, Failed or Canceled.
run_aftertimestamp with time zoneNoEarliest time a worker may claim the job.
attemptssmallintNoAttempts started so far.
locked_bytextYesWorker that holds the job while Running.
locked_attimestamp with time zoneYesWhen the worker claimed the job.
finished_attimestamp with time zoneYesWhen the job reached a final status.
last_errortextYesError of the latest failed attempt.
created_attimestamp with time zoneNoWhen the row was inserted. Set by the database.
created_byuuidYesPerson who inserted the row, or null for a platform process. Set by the database.References app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidYesPerson who last changed the row, or null for a platform process. Set by the database.References app.people.id
deleted_attimestamp with time zoneYesSoft delete time. A row with deleted_at set is ignored by every access helper.