Admission
Committed before you hear back
The job is a Postgres row before the response leaves. Workers can crash, restart, or vanish. The row cannot.
Durable job scheduling
POST work over HTTP. Flint keeps it in Postgres, leases it to a worker, and retries until it is done.
ordered by priority, then due time
leases renew while the work runs
failed jobs park with their last error
Every guarantee below is enforced in Postgres or in the claim query. None of it depends on a convention holding.
Admission
The job is a Postgres row before the response leaves. Workers can crash, restart, or vanish. The row cannot.
Dispatch
A single locked read picks the next eligible row. No coordinator to run, and no chance of two workers executing the same job.
ORDER BY effective_priority, available_at
FOR UPDATE SKIP LOCKEDRecovery
Failures return to pending with a jittered delay. Attempts that run out park in the DLQ with the last error kept.
Graphs
A job runs only after every upstream job completes. A failure cancels the pending branches instead of leaving half a result.
Five states, one eligibility clock, and a lease a worker has to keep renewing. A job settles once, as completed, failed, or cancelled.
pending
processing
completed
failed
cancelled
pending
A committed row with a due time. Claimable once available_at passes.
failed + attempts left → pending, available_at = now + backoff
pending → instant. processing → cancellation_requested
Priority, future runs, recurrence, and dependency graphs are first-class options on the same request.
{
"type": "webhook_delivery",
"payload": { "url": "https://example.com/hook" },
"priority": 1,
"scheduled_at": "2026-11-01T09:00:00Z",
"interval": "15m",
"dependency_ids": ["0f5f2f5e"]
}One endpoint for all of it. A 201 means the work is durable, not queued in memory.
priority: 11 is urgent, 3 is background. Old low-priority rows age up, so they cannot starve behind a stream of new work.
scheduled_at: 2026-11-01T09:00:00ZSet a future time once. The row waits until it is due, survives restarts, and needs no clock process to wake it.
interval: "15m"Pass an interval and the next run is inserted in the same commit as completion. A chain cannot duplicate itself.
dependency_ids: ["0f5f2f5e"]Fan out to many jobs, then fan back in. Downstream work waits for every parent, and failures cascade.
The UI is optional. Counts, worker controls, retries, and queue health are already in the API.
Set a threshold and recipients. The running fleet reads both without a restart.
dlq_threshold
Reset attempts and revive the dependents a failure cancelled along the way.
POST /dlq/{id}/retry
Stop or restart a worker calmly. Presence lives in Redis with a 60 second TTL.
POST /workers/{id}/stop
Readiness fails only when Postgres is unreachable. A degraded Redis stays up.
/health/ready
Compose brings up Postgres, Redis, the API, and a worker. Then schedule a job and inspect the result.
Set API_URL and API_KEY at runtime to show this deployment’s service facts here.
Docker Compose runs Postgres, Redis, the API, a worker and MailHog.
git clone https://github.com/muizzyraning/flint.git
cd flint
cp .env.example .env
docker compose up -d --buildCompose brings up Postgres, Redis, the API, and a worker. The docs cover everything after that.