Class: TreasureData::Command::CommandExecutor

Inherits:
Object
  • Object
show all
Defined in:
lib/td/command/import.rb

Instance Method Summary collapse

Constructor Details

#initialize(cmd, timeout) ⇒ CommandExecutor

Returns a new instance of CommandExecutor.



176
177
178
# File 'lib/td/command/import.rb', line 176

def initialize(cmd, timeout)
  @cmd, @timeout = cmd, timeout
end

Instance Method Details

#executeObject



180
181
182
183
184
185
186
187
# File 'lib/td/command/import.rb', line 180

def execute
  status = execute_command
  if status.exitstatus != 0
    raise BulkImportExecutionError,
          "Bulk Import returned error #{status.exitstatus}. Please check the 'td-bulk-import.log' logfile for details."
  end
  status
end