diff options
Diffstat (limited to 'activejob')
-rw-r--r-- | activejob/CHANGELOG.md | 16 | ||||
-rw-r--r-- | activejob/lib/active_job/exceptions.rb | 4 |
2 files changed, 9 insertions, 11 deletions
diff --git a/activejob/CHANGELOG.md b/activejob/CHANGELOG.md index 653149b6ee..9bf397af14 100644 --- a/activejob/CHANGELOG.md +++ b/activejob/CHANGELOG.md @@ -1,10 +1,15 @@ -## Rails 5.1.0.alpha ## +* Added instance variable `@queue` to JobWrapper. + + 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. + + *mu29* * 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`. +* Added declarative exception handling via `ActiveJob::Base.retry_on` and `ActiveJob::Base.discard_on`. Examples: @@ -24,12 +29,5 @@ *DHH* -* Added instance variable `@queue` to JobWrapper. - - 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. - - *mu29* - Please check [5-0-stable](https://github.com/rails/rails/blob/5-0-stable/activejob/CHANGELOG.md) for previous changes. diff --git a/activejob/lib/active_job/exceptions.rb b/activejob/lib/active_job/exceptions.rb index f8d76587ad..d236f03d53 100644 --- a/activejob/lib/active_job/exceptions.rb +++ b/activejob/lib/active_job/exceptions.rb @@ -31,12 +31,12 @@ module ActiveJob # retry_on(YetAnotherCustomAppException) do |job, exception| # ExceptionNotifier.caught(exception) # end - # retry_on ActiveRecord::StatementInvalid, wait: 5.seconds, attempts: 3 + # retry_on ActiveRecord::Deadlocked, wait: 5.seconds, attempts: 3 # retry_on Net::OpenTimeout, wait: :exponentially_longer, attempts: 10 # # def perform(*args) # # Might raise CustomAppException, AnotherCustomAppException, or YetAnotherCustomAppException for something domain specific - # # Might raise ActiveRecord::StatementInvalid when a local db deadlock is detected + # # Might raise ActiveRecord::Deadlocked when a local db deadlock is detected # # Might raise Net::OpenTimeout when the remote service is down # end # end |