Skip to content

v2.2.0

Latest

Choose a tag to compare

@janbjorge janbjorge released this 27 Nov 09:34
· 47 commits to main since this release
19cf464

PgQueuer v2.2.0

PgQueuer v2.2.0 replaces the MCP server with pgq inspection commands, checks the whole schema when a worker starts, and fixes listener, signal, driver and dashboard bugs.

No schema changes; pgq upgrade is not needed.

Breaking changes

Changed

  • QueueManager.run, SchedulerManager.run and PgQueuer.run no longer enter or exit the driver you give them. If your own driver needs async with, enter it yourself (#1166).
  • max_concurrent_tasks must now be at least batch_size, not twice batch_size (#1150).
  • The listener health check reports a dead listener after three unanswered probes in a row, about 30 s, instead of after one (#1120). A failed check is now logged as an error (#1025).
  • pgq reads PGQUEUER_DSN before PGDSN. If the two differ in your environment, pgq now connects with PGQUEUER_DSN (#1126).
  • A second SIGINT or SIGTERM stops pgq run and pgqueuer.run() at once; the first still starts a graceful shutdown (#1133).
  • set_tracing_class() is deprecated; pass PgQueuer(tracer=...) instead (#1160). A custom repository without add_listener and remove_listener still works but emits a DeprecationWarning (#1164). The next major release removes both.

Highlights

  • New read-only commands, each with --json: pgq size, pgq throughput, pgq log, pgq jobs and pgq tables. pgq schedules and pgq dashboard gain --json (#1143).
  • PgQueuer(tracer=...) sets the tracer for the queue manager and the default queries, without the global set_tracing_class() (#1158).
  • Workers and pgq verify --expect present check every table, column, index and enum label the schema declares, plus the notify function and trigger, and list every missing object. A missing non-unique index is a warning (#1157, #1161).
  • With shutdown_on_listener_failure=True, a healthy worker no longer stops about 10 seconds after it starts (#1118).
  • QueueManager.run() removes its NOTIFY listener when it stops (#1122), and pgqueuer.run() removes its signal handlers when it returns (#1133).
  • A query on a listening PsycopgDriver connection no longer waits up to 1 s (#1121).
  • AsyncpgPoolDriver returns its listener connection to the pool with the last listener, so pool.close() no longer waits forever (#1156).
  • Drain mode stops as soon as its last job ends, instead of after dequeue_timeout (#1103).
  • With a per-entrypoint concurrency_limit, the dequeue's estimated cost no longer grows with the backlog, so PostgreSQL stops JIT-compiling it on every poll (#1071).
  • A schema-qualified object name, or one longer than 63 bytes, is rejected with a clear error (#1134). pgq install and pgq upgrade stop when the queue table resolves outside current_schema() (#1135).
  • Web dashboard: /healthz answers without credentials when Basic auth is on (#1127), a cross-site POST without Sec-Fetch-Site is rejected (#1128), and pgqueuer[web] installs python-multipart.
  • In-memory adapter: cancelling a failed job keeps the dedupe key of a newer job (#1130), and cancelled jobs no longer stay in memory behind a busy higher priority (#1131).

New Contributors

Full Changelog: v2.1.0...v2.2.0