Skip to content

Commit

Permalink
Merge pull request ManageIQ#856 from jrafanie/delay_require_beefy_net…
Browse files Browse the repository at this point in the history
…_scp

Delay load the net-scp require to avoid bloating eager loading
  • Loading branch information
agrare committed May 6, 2024
2 parents e4360ed + a092ed7 commit d1c5535
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/manageiq/providers/amazon/agent_coordinator.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require 'yaml'
require 'open3'
require 'net/scp'
require 'tempfile'
require 'linux_admin'
require 'awesome_spawn'
Expand Down Expand Up @@ -148,6 +147,7 @@ def ssa_queue
private

def scp_file(ip, username, auth_key, local_file, remote_file)
require 'net/scp'
Net::SCP.upload!(ip, username, local_file, remote_file, :ssh => {:key_data => auth_key})
rescue => err
_log.error(err.message)
Expand Down

0 comments on commit d1c5535

Please sign in to comment.