Method: Cnvrg::Project#get_storage_client_fallback

Defined in:
lib/cnvrg/project.rb

#get_storage_client_fallbackObject

Raises:

  • (StandardError)


336
337
338
339
340
341
342
343
# File 'lib/cnvrg/project.rb', line 336

def get_storage_client_fallback
  response = Cnvrg::API.request("users/#{@owner}/projects/#{@slug}/download_files", "POST", {files: [], commit: get_latest_commit})
  raise StandardError.new("Can't find project credentials") unless Cnvrg::CLI.is_response_success(response, false)
  files = response['result']
  storage = files['is_s3'] ? 's3' : 'minio'
  files['storage'] = storage
  files
end