# janbjorge/pgqueuer

PostgreSQL-backed background job and task queue for Python.

Repository: https://github.com/janbjorge/pgqueuer
Canonical: https://ross.abutalabs.com/products/pgqueuer
Homepage: https://janbjorge.github.io/pgqueuer/
Language: Python
License: MIT
License Family: permissive
Topics: postgres, python, queue, asyncio, background-jobs, job-queue, postgresql, task-queue
Last push: 2026-08-23T19:52:19+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 83, longevity 61
- inputs: {"age_days": 866, "days_push": 10, "days_rel": 37, "gap_med": 5.0, "n_releases_24m": 69}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1519, forks 35 (observed 2026-08-28T04:04:57.610084+00:00)

## What it is
PgQueuer is a Python library that turns an existing PostgreSQL database into a background job and task queue using FOR UPDATE SKIP LOCKED and LISTEN/NOTIFY. It supports transactional enqueueing, cron-style recurring tasks, observability via Prometheus metrics and tracing, and an in-memory mode for testing.

## Use cases
- run background jobs from a Python app without a separate message broker
- enqueue tasks in the same transaction as database writes
- schedule recurring cron-style jobs in PostgreSQL
- process emails or notifications asynchronously with asyncio workers
- add a job queue to an existing PostgreSQL stack with minimal infrastructure
- test job processing logic without a real database

## When to choose
- you already run PostgreSQL and want a queue with no extra infrastructure
- you need transactional consistency between your data and enqueued jobs
- your workload fits a single PostgreSQL database and asyncio workers
- you want instant job dispatch via LISTEN/NOTIFY with a polling fallback

## When to avoid
- you need very high throughput beyond what a single PostgreSQL instance can handle
- you require multi-broker features like complex routing or cross-region replication
- your stack does not use PostgreSQL or Python 3.10+

## Facets
- artifact type: library
- maturity: active
- function: message-queue, scheduling, workflow-automation, monitoring
- domain: databases, backend, developer-tools
- platform: python, windows
- tags: postgresql, asyncio, job-queue, task-queue, background-jobs, listen-notify, skip-locked, cron-scheduling, prometheus-metrics, automation, linux, macos, docker

## Member repositories
- janbjorge/pgqueuer (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:57.610084+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:31:57.742305+00:00, confidence not recorded.
  - readme: https://github.com/janbjorge/pgqueuer (fetched 2026-08-28T04:04:57.610084+00:00, sha 3f9f16a2e65b)
  - homepage: https://janbjorge.github.io/pgqueuer/ (fetched 2026-08-29T11:35:13.623306+00:00, sha aa8ea5c0e2bc)
  - registry_pypi: https://pypi.org/pypi/pgqueuer/json (fetched 2026-08-29T11:35:13.633200+00:00, sha ffe636142e75)
- Data as of 2026-08-30T08:39:29.467469+00:00.
