Skip to content

Commit

Permalink
Connect to default app:server if only one is defined. Closes #41
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 authored and rosa committed Feb 1, 2024
1 parent e6c2906 commit 5f67c40
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/mission_control/jobs/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ class Engine < ::Rails::Engine
MissionControl::Jobs.delay_between_bulk_operation_batches = 2
MissionControl::Jobs.logger = ActiveSupport::Logger.new(STDOUT)

if MissionControl::Jobs.applications.one? && (application = MissionControl::Jobs.applications.first) && application.servers.one?
MissionControl::Jobs::Current.application = application
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"
end

Expand Down

0 comments on commit 5f67c40

Please sign in to comment.