Background Jobs
stackfoundry/background-jobsFreeBlock
Job table, queue abstraction, retry/cancel UI, and worker handoff patterns.
Install it
npx shadcn@latest add https://stackfoundry.dev/r/background-jobs.jsonSource
1import { integer, jsonb, pgTable, text, timestamp, uuid } from "drizzle-orm/pg-core";23export const backgroundJobs = pgTable("background_jobs", {4 id: uuid("id").primaryKey().defaultRandom(),5 name: text("name").notNull(),6 status: text("status").notNull().default("queued"),7 payload: jsonb("payload").$type<Record<string, unknown>>().notNull().default({}),8 attempts: integer("attempts").notNull().default(0),9 maxAttempts: integer("max_attempts").notNull().default(3),10 runAfter: timestamp("run_after", { withTimezone: true }).defaultNow().notNull(),11 lockedAt: timestamp("locked_at", { withTimezone: true }),12 completedAt: timestamp("completed_at", { withTimezone: true }),13 failedAt: timestamp("failed_at", { withTimezone: true }),14 createdAt: timestamp("created_at", { withTimezone: true }).defaultNow().notNull(),15});
What it pulls in
Other registry items
Files it writes
More from stackfoundry
All 157 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Account Deletionaccount-deletion | stackfoundry | Blocks | Free | no deps · 3 files | |
| Account Modesaccount-modes | stackfoundry | Blocks | Free | no deps · 3 files | |
| Account Settingsaccount-settings | stackfoundry | Blocks | Free | no deps · 2 files | |
| Admin Consoleadmin-console | stackfoundry | Blocks | Free | no deps · 2 files | |
| Agent-Ready Installsagent-ready-installs | stackfoundry | Blocks | Free | no deps · 13 files | |
| AI Chatai-chat | stackfoundry | Blocks | Free | 3 deps · 4 files | |
| AI Chatbot SDKai-chatbot-sdk | stackfoundry | Blocks | Free | 3 deps · 2 files | |
| AI Elementsai-elements | stackfoundry | Blocks | Free | no deps · 5 files |
