Class: MarketplaceKit::Commands::Pull

Inherits:
BaseAuthorizedCommand show all
Defined in:
lib/marketplace_kit/commands/pull.rb

Instance Method Summary collapse

Methods inherited from BaseAuthorizedCommand

#initialize

Methods inherited from BaseCommand

#initialize

Methods included from Services::Loggable

#log

Constructor Details

This class inherits a constructor from MarketplaceKit::Commands::BaseAuthorizedCommand

Instance Method Details

#executeObject



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/marketplace_kit/commands/pull.rb', line 4

def execute
  log :pull_started
  ensure_tmp_folder_exist

  log :request_backup
  response = send_backup_request

  log :wait_for_backup_finish
  success_response = wait_for_backup(response[:body]['id']) if response.success?

  download_and_unzip_exported_zip(success_response) if success_response
end