2018-07-20 15:40:53 -04:00
|
|
|
* Move `enqueue`/`enqueue_at` notifications to an around callback.
|
|
|
|
|
|
|
|
Improves timing accuracy over the old after callback by including
|
|
|
|
time spent writing to the adapter's IO implementation.
|
2018-06-20 15:04:07 -04:00
|
|
|
|
|
|
|
*Zach Kemp*
|
|
|
|
|
2018-06-30 11:20:04 -04:00
|
|
|
* Allow `queue` option to `assert_no_enqueued_jobs`.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
```
|
|
|
|
def test_no_logging
|
|
|
|
assert_no_enqueued_jobs queue: 'default' do
|
|
|
|
LoggingJob.set(queue: :some_queue).perform_later
|
|
|
|
end
|
|
|
|
end
|
|
|
|
```
|
|
|
|
|
|
|
|
*bogdanvlviv*
|
|
|
|
|
Allow call `assert_enqueued_with` and `assert_enqueued_email_with` with no block
Example of `assert_enqueued_with` with no block
```ruby
def test_assert_enqueued_with
MyJob.perform_later(1,2,3)
assert_enqueued_with(job: MyJob, args: [1,2,3], queue: 'low')
MyJob.set(wait_until: Date.tomorrow.noon).perform_later
assert_enqueued_with(job: MyJob, at: Date.tomorrow.noon)
end
```
Example of `assert_enqueued_email_with` with no block:
```ruby
def test_email
ContactMailer.welcome.deliver_later
assert_enqueued_email_with ContactMailer, :welcome
end
def test_email_with_arguments
ContactMailer.welcome("Hello", "Goodbye").deliver_later
assert_enqueued_email_with ContactMailer, :welcome, args: ["Hello", "Goodbye"]
end
```
Related to #33243
2018-06-29 08:17:26 -04:00
|
|
|
* Allow call `assert_enqueued_with` with no block.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
```
|
|
|
|
def test_assert_enqueued_with
|
|
|
|
MyJob.perform_later(1,2,3)
|
|
|
|
assert_enqueued_with(job: MyJob, args: [1,2,3], queue: 'low')
|
|
|
|
|
|
|
|
MyJob.set(wait_until: Date.tomorrow.noon).perform_later
|
|
|
|
assert_enqueued_with(job: MyJob, at: Date.tomorrow.noon)
|
|
|
|
end
|
|
|
|
```
|
|
|
|
|
|
|
|
*bogdanvlviv*
|
|
|
|
|
2018-06-26 17:44:21 -04:00
|
|
|
* Allow passing multiple exceptions to `retry_on`, and `discard_on`.
|
|
|
|
|
|
|
|
*George Claghorn*
|
|
|
|
|
2018-05-09 05:20:54 -04:00
|
|
|
* Pass the error instance as the second parameter of block executed by `discard_on`.
|
|
|
|
|
|
|
|
Fixes #32853.
|
|
|
|
|
|
|
|
*Yuji Yaginuma*
|
|
|
|
|
2018-03-19 16:25:39 -04:00
|
|
|
* Remove support for Qu gem.
|
|
|
|
|
|
|
|
Reasons are that the Qu gem wasn't compatible since Rails 5.1,
|
|
|
|
gem development was stopped in 2014 and maintainers have
|
|
|
|
confirmed its demise. See issue #32273
|
|
|
|
|
|
|
|
*Alberto Almagro*
|
|
|
|
|
2018-03-11 16:22:20 -04:00
|
|
|
* Add support for timezones to Active Job.
|
2018-02-22 09:14:42 -05:00
|
|
|
|
|
|
|
Record what was the current timezone in effect when the job was
|
|
|
|
enqueued and then restore when the job is executed in same way
|
|
|
|
that the current locale is recorded and restored.
|
|
|
|
|
|
|
|
*Andrew White*
|
|
|
|
|
2018-02-17 16:02:18 -05:00
|
|
|
* Rails 6 requires Ruby 2.4.1 or newer.
|
|
|
|
|
|
|
|
*Jeremy Daer*
|
|
|
|
|
2018-02-14 13:13:51 -05:00
|
|
|
* Add support to define custom argument serializers.
|
|
|
|
|
|
|
|
*Evgenii Pecherkin*, *Rafael Mendonça França*
|
2017-09-16 14:59:32 -04:00
|
|
|
|
|
|
|
|
2018-01-30 18:51:17 -05:00
|
|
|
Please check [5-2-stable](https://github.com/rails/rails/blob/5-2-stable/activejob/CHANGELOG.md) for previous changes.
|