class CircleCI::Parallel::Task::Slave

@api private

Public Instance Methods

run() click to toggle source
# File lib/circleci/parallel/task/slave.rb, line 8
def run
  create_node_data_dir
  configuration.before_sync_hook.call(node.data_dir)
  mark_as_syncing
  wait_for_master_node_to_download
  configuration.after_sync_hook.call(node.data_dir)
  done
end

Private Instance Methods

downloaded?() click to toggle source
# File lib/circleci/parallel/task/slave.rb, line 25
def downloaded?
  File.exist?(DOWNLOAD_MARKER_FILE)
end
wait_for_master_node_to_download() click to toggle source
# File lib/circleci/parallel/task/slave.rb, line 19
def wait_for_master_node_to_download
  # TODO: Consider implementing timeout mechanism
  Parallel.puts('Waiting for master node to download data...')
  Kernel.sleep(1) until downloaded?
end