Class: Superbot::Cloud::CLI::Run::AbortCommand

Inherits:
BaseCommand show all
Defined in:
lib/superbot/cloud/cli/run/abort_command.rb

Instance Method Summary collapse

Methods inherited from LoginRequiredCommand

#run, run

Methods included from Validations

#require_login

Instance Method Details

#abort_runObject



14
15
16
17
18
19
20
21
# File 'lib/superbot/cloud/cli/run/abort_command.rb', line 14

def abort_run
  id_list.each do |run_id|
    Superbot::Cloud::Api.request(:abort_interactive_run, params: { id: run_id, organization_name: organization })
    puts "Interactive run #{run_id} successfully aborted"
  rescue SystemExit
    p # skip to next run
  end
end

#executeObject



10
11
12
# File 'lib/superbot/cloud/cli/run/abort_command.rb', line 10

def execute
  abort_run
end