v1.5.0
Changes
- 437 - Use minimum between per-class
job_iteration_max_job_runtimeandJobIteration.max_job_runtime, instead of enforcing only setting decreasing values.
Because it is possible to change the global or parent values after setting the value on a class, it is not possible to truly enforce the decreasing value constraint. Instead, we now use the minimum between the global value and per-class value. This is considered a non-breaking change, as it should not break any existing code, it only removes the constraint on new classes. - 443 - Use Sidekiq
:quitcallback to detect graceful shutdown. This makes job-iteration compatible with Sidekiq run in embedded mode. - 445 - Add the
around_iteratecallback, which runs around each call ofeach_iteration. This adds extensibility to build some generic handlers, such as metrics collection and logging. - 450 - Infer which interruption adapter to use from the queue adapter of the job. This deprecates setting
JobIteration.interruption_adapter = <callable>, in favor ofJobIteration.register_interruption_adapter(<queue adapter name>, <callable>).JobIteration.interruption_adapterwill be removed in a future release.
Bug fixes
- 437 - Defer reading
JobIteration.max_job_runtimeuntil runtime, instead of closing around the value at the time of job definition. - 431 - Use
#id_valueinstead ofsend(:id)
when generating position for cursor based on:idcolumn (Rails 7.1 and above, where composite
primary models are now supported). This ensures we grab the value of the id column, rather than a
potentially composite primary key value. - 456 - Use Arel to generate SQL that's type compatible for the
cursor pagination conditionals in ActiveRecord cursor. Previously, the cursor would coerce numeric ids to a string value
(e.g.:... AND id > '1')
Full Diff: v1.4.1...v1.5.0