Repository navigation
v1.6.0
Run pgq upgrade before starting workers: this release adds a schema index.
Added
- Partial index
pgqueuer_picked_heartbeat_idxon(heartbeat) WHERE status = 'picked'. Dequeue's stale-job scan reads only timed-out rows instead of every picked job. Built with a plainCREATE INDEX, so writes block during the build. enqueue(..., on_conflict="update_priority"): a duplicatededupe_keyraises the existing job's priority (never lowers it) and returns its id instead of raisingDuplicateJobError.pgqueuer.run()starts a worker from Python without the CLI.
Changed
PGQUEUER_*settings are read once per process and shared.DBSettingsobject names are validated before reaching SQL. The default channel now follows aPGQUEUER_PREFIXset afterimport pgqueuer.- Heartbeat loop awaits its task directly instead of
asyncio.wait.
Fixed
- Shutdown: in-flight jobs and schedules drain before the driver exits; scheduler fails fast on loop errors; cancellation propagates through task and listener health checks.
- Completion watcher: polls until every waiter resolves, keeps one status query in flight under NOTIFY bursts,
refresh_interval=Nonedisables polling, no raise on exit after a cancelled waiter. - Retries:
RetryRequestedinside aTaskGroupretries the job; a failingretry_jobmarks the job failed; a retried job's context is released before re-queue. - Drivers: psycopg quotes the channel in
LISTEN/UNLISTENand delivers NOTIFYs only to their channel's callbacks; asyncpg and psycopg release the listener only on the last exit. - In-memory driver:
log_jobsemitstable_changed, statistics buckets accumulate,log_statistics(last=...)excludes the cutoff bucket.
Removed
- PostgreSQL 13 (EOL). CI tests 14–18. Stay on v1.5.0 if you need 13.
pgqueuer-webandpgqueuer-prometheusDocker images. Build fromtools/web/Dockerfileandtools/prometheus/Dockerfile.devanddocsextras. Now uv dependency groups.
New Contributors
- @rupayon123 made their first contribution in #906
- @theluckystrike made their first contribution in #946
Full Changelog: v1.5.0...v1.6.0