Class: Superbot::Cloud::CLI::Schedule::CancelCommand

Inherits:
BaseCommand show all
Defined in:
lib/superbot/cloud/cli/schedule/cancel_command.rb

Instance Method Summary collapse

Methods inherited from LoginRequiredCommand

#run, run

Methods included from Validations

#require_login

Instance Method Details

#delete_scheduleObject



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

def delete_schedule
  id_list.each do |schedule_id|
    Superbot::Cloud::Api.request(:cancel_schedule, params: { id: schedule_id, organization_name: organization })
    puts "Test schedule #{schedule_id} successfully cancelled"
  rescue SystemExit
    p # skip to next schedule
  end
end

#executeObject



10
11
12
# File 'lib/superbot/cloud/cli/schedule/cancel_command.rb', line 10

def execute
  delete_schedule
end