Skip to content

Commit

Permalink
Fixes #38022 - Do not use undefined setting
Browse files Browse the repository at this point in the history
Sometimes the production.log is filled with a message: "Setting
remote_execution_workers_pool_size has no definition, please define it
before using"

This message does not appear to be a blocker to any of the existing
functionalities, however; it is misleading while troubleshooting the
issues.
  • Loading branch information
adamlazik1 committed Nov 22, 2024
1 parent c4e8f66 commit 0639b6b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/foreman_remote_execution/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Engine < ::Rails::Engine

initializer 'foreman_remote_execution.require_dynflow', :before => 'foreman_tasks.initialize_dynflow' do |app|
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.queues.add(DYNFLOW_QUEUE)
ForemanTasks.dynflow.config.eager_load_paths << File.join(ForemanRemoteExecution::Engine.root, 'app/lib/actions')
end

Expand Down Expand Up @@ -117,11 +117,6 @@ class Engine < ::Rails::Engine
default: nil,
full_name: N_('Default SSH key passphrase'),
encrypted: true
setting 'remote_execution_workers_pool_size',
type: :integer,
description: N_('Amount of workers in the pool to handle the execution of the remote execution jobs. Restart of the dynflowd/foreman-tasks service is required.'),
default: 5,
full_name: N_('Workers pool size')
setting 'remote_execution_cleanup_working_dirs',
type: :boolean,
description: N_('When enabled, working directories will be removed after task completion. You may override this per host by setting a parameter called remote_execution_cleanup_working_dirs.'),
Expand Down

0 comments on commit 0639b6b

Please sign in to comment.