Skip to content

v1.7.1

Choose a tag to compare

@rosa rosa released this 03 Nov 18:22
· 6 commits to main since this release

Summary of changes

Process resilience

  • Processes stop and get replaced when their heartbeats keep failing past the alive threshold (#778).
  • The async supervisor replaces dead threads even if releasing their jobs fails during a database outage (#791, fixes #823).
  • Workers stop when finishing a job fails (#768).
  • Forked processes exit immediately, which avoids the exit hang on SQLite (#801).
  • The Puma plugin keeps shutting down when its output pipe is gone (#800, #737).
  • In async mode, in-flight jobs go back to the queue when shutdown times out (#815).

Jobs and concurrency

  • Jobs whose class no longer loads are failed with ClassMissingError instead of being dropped (#783).
  • Discarding ready jobs in bulk unblocks the jobs waiting behind them (#818).
  • Retrying failed jobs in bulk resets their retry counters (#817).
  • Concurrency locks are taken in key order when dispatching several jobs, which avoids deadlocks (#812).
  • One less query per enqueue (#819).
  • On MySQL, failed jobs with very large error messages no longer crash workers (#822).
  • Bulk-discarding claimed executions raises UndiscardableError instead of NameError (#828).
  • Batch completion errors no longer block the next job (#816).

Queues and recurring tasks

  • Queue prefixes escape _ and %, and each queue is selected only once (#811).
  • Dynamic tasks recreated with the same key are rescheduled (#793).

Other

  • The CLI is no longer eager loaded (#826).
  • CI pins json below 3 for Rails 7.1 and 8.0 (#813). That's test-only, but it explains the Gemfile change.
  • README additions: READ COMMITTED for MySQL, sql_notifications, the Puma plugin's behavior, retry_on and process death, async mode with TERM and QUIT, and removing leftover recurring tasks.

What's Changed

  • Replace terminated threads even if releasing their claimed jobs fails by @rosa in #791
  • Stop processes whose heartbeats keep failing past the alive threshold by @wintan1418 in #778
  • Stop workers when job finalization fails by @rafael-pissardo in #768
  • Add README notes on READ COMMITTED, sql_notifications, and the Puma plugin's failure behaviour by @rosa in #795
  • Assert the successful job's output regardless of execution order by @rosa in #796
  • Document that retry_on can't intercept process-death errors by @wintan1418 in #789
  • Harden the lifecycle and pool-size worker tests against slow databases by @rosa in #798
  • Exit forked processes immediately to avoid a SQLite mutex deadlock at exit by @rosa in #801
  • Keep the Puma plugin's shutdown going when its output is gone by @rosa in #800
  • Destroy orphan BlockedExecution rows when the job class no longer resolves by @julik in #783
  • Pin json below 3 for Rails 7.1 and 8.0 by @ceritium in #813
  • Raise UndiscardableError from ClaimedExecution's class methods by @dai199 in #828
  • Fit failed execution errors into size-limited error columns by @bhawsartanmay in #822
  • Create executions from the job record instead of its id by @andrewfader in #819
  • Reset execution counters when retrying failed jobs in bulk by @ydah in #817
  • Don't eager load the CLI by @linyiru in #826
  • Escape LIKE metacharacters in queue prefixes by @afurm in #811
  • Release in-flight jobs when the async supervisor's shutdown times out by @hannesfostie in #815
  • Unblock waiting jobs when discarding ready jobs in bulk by @ydah in #818
  • Fix rescheduling recreated dynamic tasks by @saidM in #793
  • Acquire concurrency locks by key when dispatching several jobs by @ceritium in #812
  • Keep batch completion errors from blocking subsequent jobs by @ydah in #816

New Contributors

Full Changelog: v1.7.0...v1.7.1