The behavior of enqueue.active_job changed slightly between Rails 5.2 and 6.0. In 5.2 the event doesn't fire if there's an error queuing the job. In 6.0 it always fires regardless of error.
Relevant rails code is…
- Rails 5.2: https://github.com/rails/rails/blob/6-0-stable/activejob/lib/active_job/logging.rb#L35
- Rails 6.0: https://github.com/rails/rails/blob/6-0-stable/activejob/lib/active_job/logging.rb#L35
One more interesting difference between 5.2 and 6.0 here is that 5.2 did not include timing information since it fires in an after_enqueue. In 6.0 it has moved to around_enqueue and passes the block to be instrumented.