Class: CircleCI::Parallel::Task::Master::Downloader Private
- Inherits:
-
Struct
- Object
- Struct
- CircleCI::Parallel::Task::Master::Downloader
- Defined in:
- lib/circleci/parallel/task/master.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #download ⇒ Object private
- #downloaded? ⇒ Boolean private
- #mark_as_downloaded ⇒ Object private
- #ready_for_download? ⇒ Boolean private
- #scp ⇒ Object private
Instance Method Details
#download ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
38 39 40 41 42 43 44 |
# File 'lib/circleci/parallel/task/master.rb', line 38 def download return if downloaded? return unless ready_for_download? Parallel.puts("Downloading data from #{node.ssh_host}...") @downloaded = scp mark_as_downloaded if downloaded? end |
#downloaded? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
50 51 52 |
# File 'lib/circleci/parallel/task/master.rb', line 50 def downloaded? @downloaded end |
#mark_as_downloaded ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
54 55 56 |
# File 'lib/circleci/parallel/task/master.rb', line 54 def mark_as_downloaded Kernel.system('ssh', node.ssh_host, 'touch', DOWNLOAD_MARKER_FILE) end |
#ready_for_download? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
34 35 36 |
# File 'lib/circleci/parallel/task/master.rb', line 34 def ready_for_download? Kernel.system('ssh', node.ssh_host, 'test', '-f', JOIN_MARKER_FILE) end |
#scp ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
46 47 48 |
# File 'lib/circleci/parallel/task/master.rb', line 46 def scp Kernel.system('scp', '-q', '-r', "#{node.ssh_host}:#{node.data_dir}", BASE_DATA_DIR) end |