2021-09-15 18:22:51 -04:00
|
|
|
## Rails 7.0.0.alpha2 (September 15, 2021) ##
|
|
|
|
|
|
|
|
* No changes.
|
|
|
|
|
|
|
|
|
2021-09-15 17:55:08 -04:00
|
|
|
## Rails 7.0.0.alpha1 (September 15, 2021) ##
|
|
|
|
|
2021-07-28 18:32:19 -04:00
|
|
|
* Allow a job to retry indefinitely
|
|
|
|
|
|
|
|
The `attempts` parameter of the `retry_on` method now accepts the
|
|
|
|
symbol reference `:unlimited` in addition to a specific number of retry
|
|
|
|
attempts to allow a developer to specify that a job should retry
|
|
|
|
forever until it succeeds.
|
|
|
|
|
|
|
|
class MyJob < ActiveJob::Base
|
|
|
|
retry_on(AlwaysRetryException, attempts: :unlimited)
|
|
|
|
|
|
|
|
# the actual job code
|
|
|
|
end
|
|
|
|
|
|
|
|
*Daniel Morton*
|
|
|
|
|
2021-01-15 10:13:13 -05:00
|
|
|
* Added possibility to check on `:priority` in test helper methods
|
2021-07-20 21:08:08 -04:00
|
|
|
`assert_enqueued_with` and `assert_performed_with`.
|
2021-01-15 10:13:13 -05:00
|
|
|
|
|
|
|
*Wojciech Wnętrzak*
|
|
|
|
|
2021-03-22 05:25:49 -04:00
|
|
|
* OpenSSL constants are now used for Digest computations.
|
|
|
|
|
|
|
|
*Dirkjan Bussink*
|
|
|
|
|
2021-07-20 21:08:08 -04:00
|
|
|
* Add a Serializer for the Range class.
|
2021-05-13 17:33:51 -04:00
|
|
|
|
2021-07-20 21:08:08 -04:00
|
|
|
This should allow things like `MyJob.perform_later(range: 1..100)`.
|
2021-05-13 17:33:51 -04:00
|
|
|
|
2021-01-19 09:57:46 -05:00
|
|
|
* Communicate enqueue failures to callers of `perform_later`.
|
|
|
|
|
|
|
|
`perform_later` can now optionally take a block which will execute after
|
|
|
|
the adapter attempts to enqueue the job. The block will receive the job
|
|
|
|
instance as an argument even if the enqueue was not successful.
|
2021-02-06 15:41:07 -05:00
|
|
|
Additionally, `ActiveJob` adapters now have the ability to raise an
|
2021-01-19 09:57:46 -05:00
|
|
|
`ActiveJob::EnqueueError` which will be caught and stored in the job
|
|
|
|
instance so code attempting to enqueue jobs can inspect any raised
|
|
|
|
`EnqueueError` using the block.
|
|
|
|
|
|
|
|
MyJob.perform_later do |job|
|
|
|
|
unless job.successfully_enqueued?
|
|
|
|
if job.enqueue_error&.message == "Redis was unavailable"
|
|
|
|
# invoke some code that will retry the job after a delay
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
*Daniel Morton*
|
|
|
|
|
2021-02-01 20:06:49 -05:00
|
|
|
* Don't log rescuable exceptions defined with `rescue_from`.
|
2020-11-02 16:12:47 -05:00
|
|
|
|
2020-12-24 12:41:54 -05:00
|
|
|
*Hu Hailin*
|
2020-06-22 10:09:14 -04:00
|
|
|
|
2021-01-22 16:07:53 -05:00
|
|
|
* Allow `rescue_from` to rescue all exceptions.
|
2020-11-02 16:12:47 -05:00
|
|
|
|
2021-01-22 16:07:53 -05:00
|
|
|
*Adrianna Chang*, *Étienne Barrié*
|
2020-06-22 10:09:14 -04:00
|
|
|
|
2020-12-30 01:06:09 -05:00
|
|
|
|
2020-12-02 18:37:26 -05:00
|
|
|
Please check [6-1-stable](https://github.com/rails/rails/blob/6-1-stable/activejob/CHANGELOG.md) for previous changes.
|