Skip to content

v1.6.0

Latest

Choose a tag to compare

@janbjorge janbjorge released this 11 Oct 19:35
· 2 commits to main since this release
efcd656

v1.6.0

Run pgq upgrade before starting workers: this release adds a schema index.

Added

  • Partial index pgqueuer_picked_heartbeat_idx on (heartbeat) WHERE status = 'picked'. Dequeue's stale-job scan reads only timed-out rows instead of every picked job. Built with a plain CREATE INDEX, so writes block during the build.
  • enqueue(..., on_conflict="update_priority"): a duplicate dedupe_key raises the existing job's priority (never lowers it) and returns its id instead of raising DuplicateJobError.
  • pgqueuer.run() starts a worker from Python without the CLI.

Changed

  • PGQUEUER_* settings are read once per process and shared. DBSettings object names are validated before reaching SQL. The default channel now follows a PGQUEUER_PREFIX set after import 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=None disables polling, no raise on exit after a cancelled waiter.
  • Retries: RetryRequested inside a TaskGroup retries the job; a failing retry_job marks the job failed; a retried job's context is released before re-queue.
  • Drivers: psycopg quotes the channel in LISTEN/UNLISTEN and delivers NOTIFYs only to their channel's callbacks; asyncpg and psycopg release the listener only on the last exit.
  • In-memory driver: log_jobs emits table_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-web and pgqueuer-prometheus Docker images. Build from tools/web/Dockerfile and tools/prometheus/Dockerfile.
  • dev and docs extras. Now uv dependency groups.

New Contributors

Full Changelog: v1.5.0...v1.6.0