-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #37847 - Support Rails 7.0 #921
Fixes #37847 - Support Rails 7.0 #921
Conversation
app.reloader.to_prepare do | ||
ForemanTasks.dynflow.require! | ||
ForemanTasks.dynflow.config.queues.add(DYNFLOW_QUEUE, :pool_size => Setting['remote_execution_workers_pool_size']) if Setting.table_exists? rescue(false) | ||
ForemanTasks.dynflow.config.eager_load_paths << File.join(ForemanRemoteExecution::Engine.root, 'app/lib/actions') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if this is not in a reloader.to_prepare
block? Doing this each time the application is reloaded would most probably lead to memory bloating? Unless the list of paths to eager load get wiped on reload
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a long time, Zeitwerk didn't like if during initialization time an autoloadable constant was addressed. In this case Setting
, which is a model constant, thus an autoloadable/reloadable constant.
But now it seems redundant to put this into that block...
5a54bb4
to
deb8e7f
Compare
deb8e7f
to
94c40be
Compare
94c40be
to
9f12df2
Compare
As of now, this PR can be merged at any time it's ready (dropped the last commit) since it doesn't depend on Foreman's PR. |
9f12df2
to
7ce103c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you @ofedoren ! |
No description provided.