Skip to content

Commit

Permalink
Add config.mission_control.jobs.show_console_help that defaults to true
Browse files Browse the repository at this point in the history
To display or hide the irb help message
  • Loading branch information
dorianmariecom committed Feb 23, 2024
1 parent 609c895 commit 7e4dd1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/mission_control/jobs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ module Jobs
mattr_accessor :delay_between_bulk_operation_batches, default: 0
mattr_accessor :logger, default: ActiveSupport::Logger.new(nil)
mattr_accessor :internal_query_count_limit, default: 500_000 # Hard limit to keep unlimited count queries fast enough
mattr_accessor :show_console_help, default: true
end
end
8 changes: 6 additions & 2 deletions lib/mission_control/jobs/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ class Engine < ::Rails::Engine
isolate_namespace MissionControl::Jobs

config.mission_control = ActiveSupport::OrderedOptions.new unless config.try(:mission_control)
config.mission_control.jobs = ActiveSupport::OrderedOptions.new
config.mission_control.jobs = ActiveSupport::OrderedOptions.new(
show_console_help: true
)

config.before_initialize do
config.mission_control.jobs.applications = MissionControl::Jobs::Applications.new
Expand Down Expand Up @@ -79,7 +81,9 @@ class Engine < ::Rails::Engine
MissionControl::Jobs::Current.server = application.servers.first
end

puts "\n\nType 'jobs_help' to see how to connect to the available job servers to manage jobs\n\n"
if config.mission_control.jobs.show_console_help
puts "\n\nType 'jobs_help' to see how to connect to the available job servers to manage jobs\n\n"
end
end

initializer "mission_control-jobs.assets" do |app|
Expand Down

0 comments on commit 7e4dd1e

Please sign in to comment.