rails/activejob/CHANGELOG.md

57 lines
1.7 KiB
Markdown
Raw Normal View History

* Add more detailed description to job generator.
*Gannon McGibbon*
* `perform.active_job` notification payloads now include `:db_runtime`, which
is the total time (in ms) taken by database queries while performing a job.
This value can be used to better understand how a job's time is spent.
*Jonathan Hefner*
2022-03-21 12:39:02 +00:00
* Update `ActiveJob::QueueAdapters::QueAdapter` te remove deprecation warning
Remove a deprecation warning introduced in que 1.2 to prepare for changes in
que 2.0 necessary for Ruby 3 compatibility.
*Damir Zekic* and *Adis Hasovic*
* Add missing `bigdecimal` require in `ActiveJob::Arguments`
Could cause `uninitialized constant ActiveJob::Arguments::BigDecimal (NameError)`
when loading Active Job in isolation.
*Jean Boussier*
* Allow testing `discard_on/retry_on ActiveJob::DeserializationError`
Previously in `perform_enqueued_jobs`, `deserialize_arguments_if_needed`
was called before calling `perform_now`. When a record no longer exists
and is serialized using GlobalID this led to raising
an `ActiveJob::DeserializationError` before reaching `perform_now` call.
This behavior makes difficult testing the job `discard_on/retry_on` logic.
Now `deserialize_arguments_if_needed` call is postponed to when `perform_now`
is called.
Example:
```ruby
class UpdateUserJob < ActiveJob::Base
discard_on ActiveJob::DeserializationError
def perform(user)
# ...
end
end
# In the test
User.destroy_all
assert_nothing_raised do
perform_enqueued_jobs only: UpdateUserJob
end
```
*Jacopo Beschi*
2021-12-07 15:52:30 +00:00
Please check [7-0-stable](https://github.com/rails/rails/blob/7-0-stable/activejob/CHANGELOG.md) for previous changes.