aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* Follow up tweaks b89a3e7e638a50c648a17d09c48b49b707e1d90d [ci skip]Ryuta Kamizono2019-03-311-1/+1
| | | | | | * use backticks instead of `+` * and more (e.g. missed replacing `Array#excluding` and `Enumerable#excluding` in b89a3e7e638a50c648a17d09c48b49b707e1d90d)
* Drop microseconds in job argument assertionsGannon McGibbon2019-03-221-0/+5
|
* Prep releaseeileencodes2019-03-111-0/+5
| | | | | | | * Update RAILS_VERSION * Bundle * rake update_versions * rake changelog:header
* Preparing for 6.0.0.beta2 releaseRafael Mendonça França2019-02-251-0/+5
|
* Preparing for 6.0.0.beta1 releaseRafael Mendonça França2019-01-181-0/+2
|
* Require Ruby 2.5 for Rails 6.Kasper Timm Hansen2018-12-191-2/+2
| | | | | | | | | | Generally followed the pattern for https://github.com/rails/rails/pull/32034 * Removes needless CI configs for 2.4 * Targets 2.5 in rubocop * Updates existing CHANGELOG entries for fewer merge conflicts * Removes Hash#slice extension as that's inlined on Ruby 2.5. * Removes the need for send on define_method in MethodCallAssertions.
* Improve deprecation message for enqueue returning falseRafael Mendonça França2018-12-051-0/+7
| | | | | | And make sure new applications in Rails 6.0 has this config enabled. Also, improve test coverage and add a CHANGELOG entry.
* Keep executions for each specific exception (#34352)Alberto Almagro2018-11-231-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Keep executions for each specific declaration Fixes #34337 ActiveJob used the global executions counter to control the number of times a job should be retried. The problem with this approach was that in case a job raised different exceptions during its executions they weren't retried the number of times defined by their `attemps` number. **Example:** Having the following job: ```ruby class BuggyJob < ActiveJob::Base retry_on CustomException, attemps: 3 retry_on OtherException, attempts: 3 end ``` If the job raised `CustomException` in the first two executions and then it raised `OtherException`, the job wasn't retried anymore because the global executions counter was already indicating 3 attempts. With this patch each `retry_on` declaration has its specific counter so that the first two executions that raise `CustomException` don't affect the retries count that future exceptions may have. * Revert "clarifies documentation around the attempts arugment to retry_on" This reverts commit 86aa8f8c5631f77ed9a208e5107003c01512133e.
* Allow all ActiveJob assertion helper to accept Proc in their `only` kw:Edouard CHIN2018-11-211-0/+5
| | | | | | | | - That feature is useful to enqueue or assert that jobs got enqueued or performed based on dynamic conditions. We will be able to leverage that feature to fix all ActionMailer assertion helper issue when a Mailer define a custom delivery job (see next commit).
* Restore HWIA support to AJ::Arguments.deserializeGannon McGibbon2018-10-301-0/+4
| | | | | Restore HashWithIndifferentAccess support to ActiveJob::Arguments.deserialize.
* Include deserialized arguments in jobs returned by AJ test helpersAlan Wu2018-10-121-0/+5
| | | | | | | | `assert_enqueued_with` and `assert_performed_with` return a instantiated instance of the matching job for further assertion (#21010). Before this commit the `arguments` method on the returned instance returns a serialized version of the arguments.
* Add a way to check for subset of arguments when performing jobs:Edouard CHIN2018-09-261-0/+6
| | | | | | | | | | | | - When calling `assert_performed_with`/`assert_enqueued_with`, the +args+ needs to match exactly what the job get passed. Some jobs can have lot of arguments, or even a simple hash argument has many key. This is not convenient to test as most tests doesn't need to check if the arguments matches perfectly. This PR make it possible to only check if a subset of arguments were passed to the job.
* Add changelog entries for #33849 [ci skip]bogdanvlviv2018-09-131-0/+4
| | | | | | | Since these changes related to the public API, I think we should add changelog entries. Related to #33838, #33849
* Add hooks to ActiveJob around retries and discardsSteve S2018-08-291-0/+4
|
* Allow `assert_performed_with` to be called without a block.bogdanvlviv2018-08-201-0/+4
| | | | | | | | | | | | | | | Example: ``` def test_assert_performed_with MyJob.perform_later(1,2,3) perform_enqueued_jobs assert_performed_with(job: MyJob, args: [1,2,3], queue: 'high') end ``` Follow up #33626.
* Fix `assert_performed_jobs` and `assert_no_performed_jobs`bogdanvlviv2018-08-201-0/+5
| | | | | Execution of `assert_performed_jobs`, and `assert_no_performed_jobs` without a block should respect passed `:except`, `:only`, and `:queue` options.
* Add changelog entry about adding `:queue` option to job assertions and helpersbogdanvlviv2018-08-201-13/+4
| | | | | Note that it removes changelog entry of #33265 since the entry in this commits includes that too.
* Allow `perform_enqueued_jobs` to be called without a block.Kevin Deisz2018-08-151-0/+6
| | | | Performs all of the jobs that have been enqueued up to this point in the test.
* [ci skip] Fixup changelog. Trim title. Mention benefit.Kasper Timm Hansen2018-07-201-1/+4
|
* Wrap ActiveJob::Enqueue in evented ActiveSupport::Notificationzvkemp2018-07-171-0/+4
|
* Allow `queue` option to `assert_no_enqueued_jobs`bogdanvlviv2018-06-301-0/+13
| | | | | | | | | | | It can be asserted that no jobs are enqueued to a specific queue: ```ruby def test_no_logging assert_no_enqueued_jobs queue: 'default' do LoggingJob.set(queue: :some_queue).perform_later end end ```
* Allow call `assert_enqueued_with` and `assert_enqueued_email_with` with no blockbogdanvlviv2018-06-291-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add changelog entry for 3110cae [ci skip]bogdanvlviv2018-06-271-0/+4
| | | | | | | Since it is changes of the public API, it seems valuable to add a mention about it to the changelog file. Follow up 3110caecbebdad7300daaf26bfdff39efda99e25
* Pass the error instance as the second parameter of block executed by ↵yuuji.yaginuma2018-05-121-0/+6
| | | | | | | | | | | `discard_on` I'm not sure what originally wanted to pass to the argument. However, as long as see the document added along with the commit, it seems just to be mistaken that trying to pass the error instance. https://github.com/rails/rails/pull/30622/files#diff-59beb0189c8c6bc862edf7fdb84ff5a7R64 Fixes #32853
* Remove support for Qu gem.Alberto Almagro2018-03-191-0/+8
| | | | | | 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
* Remove changelog header for unreleased versionRafael Mendonça França2018-03-131-2/+0
| | | | | | We only add the header when releasing to avoid some conflicts. [ci skip]
* Fix CHANGELOGs [ci skip]bogdanvlviv2018-03-121-1/+1
| | | | | | | | - Add missing dots. - Remove reference to itself on GitHub. Usually, we add references to fixed issues only in a changelog. Follow up #32223
* Add support for timezones to Active JobAndrew White2018-02-221-0/+8
| | | | | | 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.
* Rails 6 requires Ruby 2.4.1+Jeremy Daer2018-02-171-0/+6
| | | | | | Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug. References #32028
* Add CHANGELOG entryRafael Mendonça França2018-02-141-0/+3
|
* Start Rails 6.0 development!!!Rafael Mendonça França2018-01-301-27/+1
| | | | :tada::tada::tada:
* Fix CHANGELOG format [ci skip]Ryuta Kamizono2018-01-241-4/+5
| | | | | | * Add backticks * Expand tabs * Fix indentation
* Merge branch 'master' into custom-discarded-job-handlingAidan Haran2017-12-091-4/+8
|\
| * Preparing for 5.2.0.beta2 releaseRafael Mendonça França2017-11-281-0/+5
| |
| * Preparing for 5.2.0.beta1 releaseRafael Mendonça França2017-11-271-0/+2
| |
| * Remove CHANGELOT entry for the change that was backported to 5-1-stable [ci ↵Prathamesh Sonpatki2017-10-231-7/+0
| | | | | | | | | | | | | | | | skip] - It was backported in https://github.com/rails/rails/commit/0eae8dd4b859c109919e5da0d6e74ffc6dc8a258 and is present in Rails 5.1.3
| * redis-rb 4.0 supportJeremy Daer2017-10-081-0/+4
| | | | | | | | | | | | | | | | * Use `gem 'redis', '~> 4.0'` for new app Gemfiles * Loosen Action Cable redis-rb dep to `>= 3.3, < 5` * Bump redis-namespace for looser Redis version dep * Avoid using the underlying `redis.client` directly * Use `Redis.new` instead of `Redis.connect`
* | Allow for custom handling of exceptions that are discardedAidan Haran2017-09-161-0/+16
|/
* Cleanup CHANGELOGs [ci skip]Ryuta Kamizono2017-04-301-0/+1
| | | | | | * Remove trailing spaces. * Add backticks around method and command. * Fix indentation.
* Add error logging to Active JobSteven Bull2017-03-271-0/+6
| | | | | | | | | | | | | | | | | | | | Active Job logging instrumentation is changed to log errors (with backtrace) when a job raises an exception in #perform. This improves debugging during development and test with the default configuration. Prior to Rails 5, the default development configuration ran jobs with InlineAdapter, which would raise exceptions to the caller and be shown in the development log. In Rails 5, the default adapter was changed to AsyncAdapter, which would silently swallow exceptions and log a "Performed SomeJob from Async..." info message. This could be confusing to a developer, as it would seem that the job was performed successfully. This patch removes the "Performed..." info message from the log and adds an error-level "Error performing SomeJob..." log message which includes the exception backtrace for jobs that raise an exception within the #perform method. It provides this behavior for all adapters.
* Start Rails 5.2 developmentMatthew Draper2017-03-221-49/+1
|
* Revert #27850 following test breakage (#28427)David Heinemeier Hansson2017-03-151-4/+0
|
* Preparing for 5.1.0.beta1 releaseRafael Mendonça França2017-02-231-0/+2
|
* Remove extra spacesJon Moss2017-02-211-1/+1
| | | | [ci skip]
* correctly set test adapter when configure the queue adapter on a per job ↵Yuji Yaginuma2017-01-311-0/+6
| | | | | | | | | | | | (#26690) The `ActiveJob::TestHelper` replace the adapter to test adapter in `before_setup`. It gets the target class using the `descendants`, but if the test target job class is not loaded, will not be a replacement of the adapter. Therefore, instead of replacing with `before_setup`, modified to replace when setting adapter. Fixes #26360
* Append skipped jobs to enqueued_jobsAlexander Pauly2017-01-311-0/+4
| | | | | | | | | | Refactored ActiveJob TestAdapter Updated ActiveJob changelog Fixed typo in changelog Fixed formatting issue in changelog
* Removed deprecated support to passing the adapter class to .queue_adapterRafael Mendonça França2016-10-101-0/+4
|
* Removed deprecated #original_exception in ActiveJob::DeserializationErrorRafael Mendonça França2016-10-101-0/+4
|
* correct exception class in `retry_on` example [ci skip]yuuji.yaginuma2016-10-091-2/+2
| | | | | If the deadlock has occurred `ActiveRecord::Deadlocked` will raise. Ref: #25107, #26059
* Merge pull request #26205 from pedaling-corp/fix/active-job-resqueRafael Mendonça França2016-08-231-2/+8
|\ | | | | | | Add @queue variable to JobWrapper