OutlabsTaskq
Alpha · 0.1.0a27

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, complete operator CLI, standalone scheduler, optional FastAPI facade, follow-ups, workflows, schedules, continuations, trusted effects, and a per-queue flow-control plane. Current release: 0.1.0a27.
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 --dsn-env TASKQ_DSN worker run --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.0a27

SQL contract 0.6.6 includes the queue kernel, orchestration surfaces, workflow continuations, bounded operator projections, trusted host-effect fencing, and the per-queue flow-control plane — breaker, rate limits, caps, priority aging, counters, and health verdicts.
Typed enqueue
created / existed — reject-only uniqueness, never silent null on conflict.
Fenced claims
SKIP LOCKED plus per-attempt UUIDs so stale workers cannot settle stolen jobs.
Atomic follow-ups
Parent settle and child inserts commit together via declared Followup targets.
Workflows & schedules
Sealed dependency graphs and database-time cron schedules owned by Postgres.
HTTP facade
Mount the FastAPI facade for fleets that must not hold database credentials.
Durable admission
Reserve / finish / cancel two-phase admission without inventing a second outbox.
Workflow continuations
Grow a sealed workflow safely through a compiled, hash-pinned member policy.
Trusted effects
Fence co-resident domain mutations against the exact active TaskQ attempt.
Flow control
Per-queue circuit breaker, rate limits, in-flight caps, priority aging, smear, and health verdicts — off by default.
Documentation

Read in order

The public docs match the 0.1.0a27 package surface. Deep design specs live in the GitHub repo.
Read the introduction
0.1.0a27 / SQL 0.6.6 — what ships and why the contract is SQL-first.
Install extras
Pin the PyPI prerelease, then plan, migrate, bind, and verify safely.
Quickstart
Task + TaskRegistry, enqueue, and taskq worker run against Postgres.