diff options
Diffstat (limited to 'activejob/CHANGELOG.md')
-rw-r--r-- | activejob/CHANGELOG.md | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/activejob/CHANGELOG.md b/activejob/CHANGELOG.md index 9bf397af14..77dfdefc05 100644 --- a/activejob/CHANGELOG.md +++ b/activejob/CHANGELOG.md @@ -1,33 +1,8 @@ -* Added instance variable `@queue` to JobWrapper. +* Change logging instrumentation to log errors when a job raises an exception. - This will fix issues in [resque-scheduler](https://github.com/resque/resque-scheduler) `#job_to_hash` method, - so we can use `#enqueue_delayed_selection`, `#remove_delayed` method in resque-scheduler smoothly. + Fixes #26848. - *mu29* + *Steven Bull* -* Yield the job instance so you have access to things like `job.arguments` on the custom logic after retries fail. - *DHH* - -* Added declarative exception handling via `ActiveJob::Base.retry_on` and `ActiveJob::Base.discard_on`. - - Examples: - - class RemoteServiceJob < ActiveJob::Base - retry_on CustomAppException # defaults to 3s wait, 5 attempts - retry_on AnotherCustomAppException, wait: ->(executions) { executions * 2 } - retry_on ActiveRecord::StatementInvalid, wait: 5.seconds, attempts: 3 - retry_on Net::OpenTimeout, wait: :exponentially_longer, attempts: 10 - discard_on ActiveJob::DeserializationError - - def perform(*args) - # Might raise CustomAppException or AnotherCustomAppException for something domain specific - # Might raise ActiveRecord::StatementInvalid when a local db deadlock is detected - # Might raise Net::OpenTimeout when the remote service is down - end - end - - *DHH* - - -Please check [5-0-stable](https://github.com/rails/rails/blob/5-0-stable/activejob/CHANGELOG.md) for previous changes. +Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/activejob/CHANGELOG.md) for previous changes. |