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.
39 40 41 42 43 44 45 |
# File 'lib/circleci/parallel/task/master.rb', line 39 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.
51 52 53 |
# File 'lib/circleci/parallel/task/master.rb', line 51 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.
55 56 57 |
# File 'lib/circleci/parallel/task/master.rb', line 55 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.
35 36 37 |
# File 'lib/circleci/parallel/task/master.rb', line 35 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.
47 48 49 |
# File 'lib/circleci/parallel/task/master.rb', line 47 def scp Kernel.system('scp', '-q', '-r', "#{node.ssh_host}:#{node.data_dir}", BASE_DATA_DIR) end |