Skip to content

Commit

Permalink
Fixes #37503 - Delay plugin finalization until seeds are seeded
Browse files Browse the repository at this point in the history
Moving it to a different file alphabetically after seeds.rb makes the
callback finalizing plugin end up being put after the callback that does
the seeding.
  • Loading branch information
adamruzicka authored and ofedoren committed Jul 18, 2024
1 parent 7ce3336 commit b5638c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 0 additions & 4 deletions config/initializers/foreman.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@

Rails.application.config.after_initialize do
Foreman.settings.load_values unless Foreman.in_setup_db_rake? || !(Setting.table_exists? rescue false)

Foreman::Plugin.registered_plugins.each do |_name, plugin|
plugin.finalize_setup!
end
end

Rails.application.config.to_prepare do
Expand Down
3 changes: 3 additions & 0 deletions config/initializers/y_finalize_plugins.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Rails.application.config.after_initialize do
Foreman::Plugin.registered_plugins.each_value(&:finalize_setup!)
end

0 comments on commit b5638c7

Please sign in to comment.