rails/railties/lib
Edouard CHIN bbfab0b33a Don't run AJ after_enqueue / after_perform when chain is halted:
- ### Problem

  ```ruby
    MyJob < ApplicationJob
      before_enqueue { throw(:abort) }
      after_enqueue { # enters here }
    end
  ```
  I find AJ behaviour on after_enqueue and after_perform callbacks
  weird as they get run even when the callback chain is halted.
  It's counter intuitive to run the after_enqueue callbacks even
  though the job wasn't event enqueued.

  ### Solution

  In Rails 6.2, I propose to make the new behaviour the default
  and stop running after callbacks when the chain is halted.
  For application that wants this behaviour now or in 6.1
  they can do so by adding the `config.active_job.skip_after_callbacks_if_terminated = true`
  in their configuration file.
2019-12-09 17:17:23 +01:00
..
minitest Railities typo fixes. 2019-02-01 16:42:40 +05:30
rails Don't run AJ after_enqueue / after_perform when chain is halted: 2019-12-09 17:17:23 +01:00
rails.rb Fix document formatting of Rails.group [ci skip] 2019-09-05 19:00:20 +09:00