Skip to content

Commit

Permalink
Ensure Active Record is initialized during boot (workaround?)
Browse files Browse the repository at this point in the history
  • Loading branch information
bensheldon committed Nov 29, 2024
1 parent 29c96dd commit 34ed6fa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions demo/config/initializers/good_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
}
end

Rails.configuration.after_initialize do
# TODO: It should not be necessary to manually initialize Active Record base
# This seemed to be introduced when PG Hero was added.
ActiveJob::Base
end

case Rails.env
when 'development'
GoodJob.on_thread_error = -> (error) { Rails.logger.warn("#{error}\n#{error.backtrace}") }
Expand Down

0 comments on commit 34ed6fa

Please sign in to comment.