Skip to content

v2.1.0

Choose a tag to compare

@janbjorge janbjorge released this 22 Nov 13:41
· 101 commits to main since this release
0d3282b

PgQueuer v2.1.0

PgQueuer v2.1.0 caps how many jobs one worker claims by default, stops idle-capacity polling, and fixes CLI, scheduler, and driver shutdown bugs.

No schema changes; pgq upgrade is not needed.

Changed

  • max_concurrent_tasks now defaults to max(100, 2 * batch_size) instead of unlimited, in QueueManager.run, PgQueuer.run and pgq run. A worker no longer claims a whole backlog. Pass a higher value, or 0 for the old unlimited behavior (#1090).
  • QueueRepositoryPort gains next_stale_eta and a concurrency_limits keyword on eligible_queued_work. Custom repositories must add both (#1092).
  • MCP failed_jobs no longer returns the log row id (job_id remains), and traceback is a JSON object instead of a JSON string. queue_stats and throughput_summary need write access (#1094).

Highlights

  • A worker at max_concurrent_tasks, or with every entrypoint at its concurrency_limit, no longer re-polls the database every 100 ms. A burst of NOTIFYs costs one dequeue (#1087).
  • An idle worker wakes about every heartbeat_timeout / 2 while other workers run its entrypoints, so a dead worker's job is re-picked once its heartbeat goes stale (#1092).
  • pgq install, pgq upgrade, pgq sql install and pgq sql upgrade fall back to PGQUEUER_DURABILITY and PGQUEUER_WIDEN_ID when the flags are not passed (#1089).
  • pgq run no longer crashes on typer 0.29 with Python 3.14; --log-level is a case-insensitive choice (#1097).
  • Schedule heartbeats stay alive until an in-flight fetch and its dispatched work finish draining at shutdown (#1083).
  • AsyncpgPoolDriver no longer raises on exit when its listener connection died, and QueueManager.run raises FailingListenerError again instead of a driver error (#1026).
  • Long exception tracebacks wrap on the web dashboard.

New Contributors

Full Changelog: v2.0.0...v2.1.0