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
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org. A row never moves to another org.References app.organizations.id |
| job_kind | text | No | What the job does.References private.job_kinds.code |
| subject_id | uuid | No | Row of the job kind's subject table the job works on. |
| job_status | app.job_status | No | Queued, Running, Succeeded, Failed or Canceled. |
| run_after | timestamp with time zone | No | Earliest time a worker may claim the job. |
| attempts | smallint | No | Attempts started so far. |
| locked_by | text | Yes | Worker that holds the job while Running. |
| locked_at | timestamp with time zone | Yes | When the worker claimed the job. |
| finished_at | timestamp with time zone | Yes | When the job reached a final status. |
| last_error | text | Yes | Error of the latest failed attempt. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Yes | Person who inserted the row, or null for a platform process. Set by the database.References app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Yes | Person who last changed the row, or null for a platform process. Set by the database.References app.people.id |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |