Repository navigation
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
- Removed the MCP server,
pgqueuer.adapters.mcpand thepgqueuer[mcp]extra. Every tool has apgqcommand with--json; see Migrating from the MCP server (#1144).
Changed
QueueManager.run,SchedulerManager.runandPgQueuer.runno longer enter or exit the driver you give them. If your own driver needsasync with, enter it yourself (#1166).max_concurrent_tasksmust now be at leastbatch_size, not twicebatch_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).
pgqreadsPGQUEUER_DSNbeforePGDSN. If the two differ in your environment,pgqnow connects withPGQUEUER_DSN(#1126).- A second SIGINT or SIGTERM stops
pgq runandpgqueuer.run()at once; the first still starts a graceful shutdown (#1133). set_tracing_class()is deprecated; passPgQueuer(tracer=...)instead (#1160). A custom repository withoutadd_listenerandremove_listenerstill works but emits aDeprecationWarning(#1164). The next major release removes both.
Highlights
- New read-only commands, each with
--json:pgq size,pgq throughput,pgq log,pgq jobsandpgq tables.pgq schedulesandpgq dashboardgain--json(#1143). PgQueuer(tracer=...)sets the tracer for the queue manager and the default queries, without the globalset_tracing_class()(#1158).- Workers and
pgq verify --expect presentcheck 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), andpgqueuer.run()removes its signal handlers when it returns (#1133).- A query on a listening
PsycopgDriverconnection no longer waits up to 1 s (#1121). AsyncpgPoolDriverreturns its listener connection to the pool with the last listener, sopool.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 installandpgq upgradestop when the queue table resolves outsidecurrent_schema()(#1135). - Web dashboard:
/healthzanswers without credentials when Basic auth is on (#1127), a cross-site POST withoutSec-Fetch-Siteis rejected (#1128), andpgqueuer[web]installspython-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
- @SVR1339 made their first contribution in #1138
- @VamikaSinghal made their first contribution in #1142
- @joshuavivo made their first contribution in #1165
Full Changelog: v2.1.0...v2.2.0