This release adds 3 notable features for engineering teams evaluating rollout.
Published 6mo
Streaming & Message Queues
✓ No known CVEs patched
✓ No known CVEs patched in this version
Topics
postgresql
python
queue
Affected surfaces
auth
Summary
AI summaryPostgREST RPC adds HTTP job enqueueing, one‑liner constructors reuse existing DB connections, and entrypoints can receive runtime context.
Full changelog
🚀 Highlights 🚀
PostgREST RPC: Enqueue Jobs over HTTP
- New
fn_pgqueuer_enqueueRPC unlocks any HTTP client for job submission via PostgREST. docs/postgrest.mdwalks you end-to-end: define the function, grant least-privilege access, plug it into PostgREST, and exercise it with curl.- Safety callouts (auth, payload limits, entrypoint whitelisting) are front and center so you can deploy responsibly.
One-Liner Constructors for Existing Connections
PgQueuer.from_asyncpg_connection,.from_asyncpg_pool, and.from_psycopg_connectionlet you reuse the pools and connections you already manage—no wrapper boilerplate needed.- Matching helpers on
Queriessimplify schema installs and admin scripts:pgq = PgQueuer.from_asyncpg_pool(pool, resources={"http": http_client}) await pgq.run() - Psycopg users only need to ensure autocommit is on when they build the connection.
Entrypoints That Receive Runtime Context
- Opt in with
accepts_context=Trueto have PGQueuer call your entrypoints with both the job and context objects. - Ideal for carrying tracing headers, shared HTTP clients, or any per-worker state you register in
resources.
pgq = PgQueuer.from_asyncpg_pool(
pool,
resources={
"http": httpx.AsyncClient(),
"metrics": PrometheusClient(namespace="pgq"),
},
)
@pgq.entrypoint("thumbnail", accepts_context=True)
async def build_thumbnail(job: Job, context: Context) -> None:
http = context.resources["http"]
metrics = context.resources["metrics"]
metrics.counter("thumbnail_jobs_started").inc()
payload = job.payload or {}
image_url = payload["image_url"]
response = await http.get(image_url)
store_thumbnail(image_url, response.content)
metrics.counter("thumbnail_jobs_succeeded").inc()
Operational Touch-Ups
- Fresh Postgres driver troubleshooting guide (connection hygiene, pool resets, LISTEN/NOTIFY drift) gives on-call teams a quick diagnostic checklist.
- Docker compose docs now remind you to
docker compose down, keeping local Postgres containers from sticking around between test runs.
Pull requests
- Document docker compose teardown step by @janbjorge in https://github.com/janbjorge/pgqueuer/pull/476
- Improve TimedOverflowBuffer retries via dedicated RetryManager by @janbjorge in https://github.com/janbjorge/pgqueuer/pull/478
- Postgres driver troubleshooting by @janbjorge in https://github.com/janbjorge/pgqueuer/pull/485
- Add PgQueuer classmethods for connection initialization by @janbjorge in https://github.com/janbjorge/pgqueuer/pull/487
- Classmethods connection initialization queries by @janbjorge in https://github.com/janbjorge/pgqueuer/pull/488
- Adds accepts_context flag by @janbjorge in https://github.com/janbjorge/pgqueuer/pull/489
- Add PostgREST RPC integration for enqueuing jobs by @janbjorge in https://github.com/janbjorge/pgqueuer/pull/493
Full Changelog: https://github.com/janbjorge/pgqueuer/compare/v0.25.1...v0.25.2
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
About PgQueuer v1.0
All releases →Related context
Earlier breaking changes
- v1.0.0 QueueManager now requires Queries(driver) instead of driver directly; PgQueuer constructor unchanged
- v1.0.0 RetryWithBackoffEntrypointExecutor renamed to DatabaseRetryEntrypointExecutor and no longer depends on async-timeout
- v1.0.0 CLI flags --pg-host, --pg-user etc. removed; use libpq environment variables or --pg-dsn instead
- v1.0.0 Synchronous entrypoint handlers are rejected; only async def is allowed
- v1.0.0 Custom async Driver must implement notify(channel, payload) method
Beta — feedback welcome: [email protected]