OutlabsTaskq
Pre-alpha · 0.1.0a2

A task queue that lives in your Postgres.

OutlabsTaskq is a SQL-first job queue for Python fleets: claim, fence, retry, and settle through PL/pgSQL — with a typed Python client, worker CLI, and optional FastAPI facade. Stages 1–3 ship in 0.1.0a2.
worker.pyPostgres
from taskq import Task, TaskQ, TaskRegistry

DOUBLE = Task(name="demo.double", queue="demo", …)
registry = TaskRegistry((DOUBLE,))

tq = TaskQ.from_dsn(DATABASE_URL, registry=registry)
result = await tq.enqueue(DOUBLE, {"value": 3})
# result.status in {"created", "existed"}

# then: taskq worker --dsn … --registry tasks:registry --queue demo

SQL contract

taskq.* functions

Fenced

attempt_id CAS

Optional HTTP

Facade + auth inject

Built for the Python stack you already operate

Own the queue

Your jobs should feel like part of your database

OutlabsTaskq keeps the hot path inside Postgres. No second broker to back up, no client-clock lease math, and no silent unique-skip footguns.
  • SQL is the contract
    Claim, fencing, uniqueness, and retry budget live in PL/pgSQL — Python is a typed client.
  • Safe settles
    Attempt fencing and typed settle races mean a lost HTTP response never discards finished work.
  • Optional HTTP facade
    Workers can stay credential-free. Auth is injected — outlabs-auth is optional, never required.
Capabilities

What ships in 0.1

Stages 1–3 are independently accepted. Start with getting started, then concepts, API, and operations.
Typed enqueue
created / existed — reject-only uniqueness in 0.1, never silent null on conflict.
Fenced claims
SKIP LOCKED plus per-attempt UUIDs so stale workers cannot settle stolen jobs.
Handler results
Complete, Snooze, Cancel, Retry, NonRetryable — snooze does not burn attempts.
HTTP facade
Mount create_taskq_app for fleets that must not hold database credentials.
Consumer testing
FakeTaskQClient, inline_mode, and bounded drain without sleeping on the clock.
Redrive
Failed rows are the DLQ. Inspect, then redrive without hand UPDATEs.
Documentation

Read in order

The public docs match the 0.1.0a2 package surface. Deep design specs live in the GitHub repo.
Read the introduction
Stages 1–3 shipped in 0.1.0a2 — why SQL-first, and how it relates to outlabs-auth.
Install extras
Core, [http], and optional [outlabs] — then taskq migrate / verify.
Quickstart
Task + TaskRegistry, enqueue, and taskq worker against Postgres.