2018-11-23 14:31:14 -05:00
|
|
|
* Keep executions for each specific declaration
|
|
|
|
|
|
|
|
Each `retry_on` declaration has now its own specific executions counter. Before it was
|
|
|
|
shared between all executions of a job.
|
|
|
|
|
|
|
|
*Alberto Almagro*
|
|
|
|
|
2018-11-21 16:43:14 -05:00
|
|
|
* Allow all assertion helpers that have a `only` and `except` keyword to accept
|
|
|
|
Procs.
|
|
|
|
|
|
|
|
*Edouard Chin*
|
|
|
|
|
2018-10-30 15:33:47 -04:00
|
|
|
* Restore HashWithIndifferentAccess support to ActiveJob::Arguments.deserialize.
|
|
|
|
|
|
|
|
*Gannon McGibbon*
|
|
|
|
|
2018-10-09 13:46:16 -04:00
|
|
|
* Include deserialized arguments in job instances returned from
|
|
|
|
`assert_enqueued_with` and `assert_performed_with`
|
|
|
|
|
|
|
|
*Alan Wu*
|
|
|
|
|
2018-09-26 18:45:52 -04:00
|
|
|
* Allow `assert_enqueued_with`/`assert_performed_with` methods to accept
|
|
|
|
a proc for the `args` argument. This is useful to check if only a subset of arguments
|
|
|
|
matches your expectations.
|
|
|
|
|
|
|
|
*Edouard Chin*
|
|
|
|
|
2018-09-13 09:58:56 -04:00
|
|
|
* `ActionDispatch::IntegrationTest` includes `ActiveJob::TestHelper` module by default.
|
|
|
|
|
|
|
|
*Ricardo Díaz*
|
|
|
|
|
2018-08-29 13:28:55 -04:00
|
|
|
* Added `enqueue_retry.active_job`, `retry_stopped.active_job`, and `discard.active_job` hooks.
|
|
|
|
|
|
|
|
*steves*
|
|
|
|
|
2018-08-16 15:38:35 -04:00
|
|
|
* Allow `assert_performed_with` to be called without a block.
|
|
|
|
|
|
|
|
*bogdanvlviv*
|
|
|
|
|
2018-08-16 14:54:26 -04:00
|
|
|
* Execution of `assert_performed_jobs`, and `assert_no_performed_jobs`
|
|
|
|
without a block should respect passed `:except`, `:only`, and `:queue` options.
|
|
|
|
|
|
|
|
*bogdanvlviv*
|
|
|
|
|
2018-08-20 04:25:54 -04:00
|
|
|
* Allow `:queue` option to job assertions and helpers.
|
|
|
|
|
|
|
|
*bogdanvlviv*
|
|
|
|
|
2018-08-15 15:00:40 -04:00
|
|
|
* Allow `perform_enqueued_jobs` to be called without a block.
|
|
|
|
|
|
|
|
Performs all of the jobs that have been enqueued up to this point in the test.
|
|
|
|
|
|
|
|
*Kevin Deisz*
|
|
|
|
|
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*
|
|
|
|
|
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.
|