Method: Cnvrg::Commands::Task#run

Defined in:
lib/cnvrg/cli/task.rb

#run(path) ⇒ Object



65
66
67
68
69
70
71
72
73
74
75
# File 'lib/cnvrg/cli/task.rb', line 65

def run(path)
  begin
    path = "#{path}.task.yaml" unless path.end_with? '.task.yaml'
    @task = Cnvrg::Task.new(@curr_dir, path: path)
    url = @task.run
    @cli.log_message("Task: #{@task.title} is running, you can track its performance on #{url}", Thor::Color::GREEN)
  rescue => e
    @cli.log_message(e.message, Thor::Color::RED)
    @cli.log_error(e)
  end
end