ee/lib/gitlab/geo/transfer.rb
# Returns Result object with success boolean and number of bytes downloaded.
Returns Result object with success boolean and number of bytes downloaded.
Returns Result object with success boolean and number of bytes downloaded .
def download_from_primary
        return failure unless Gitlab::Geo.secondary?
        return failure if File.directory?(filename)
        primary = Gitlab::Geo.primary_node
        return failure unless primary
        url = primary.geo_transfers_url(file_type, file_id.to_s)
        req_headers = TransferRequest.new(request_data).headers
        return failure unless ensure_path_exists
        download_file(url, req_headers)
      end
def download_from_primary return failure unless Gitlab :: Geo . secondary? return failure if File . directory? ( filename ) primary = Gitlab :: Geo . primary_node return failure unless primary url = primary . geo_transfers_url ( file_type , file_id . to_s ) req_headers = TransferRequest . new ( request_data ) . headers return failure unless ensure_path_exists download_file ( url , req_headers ) end
Returns Result object with success boolean and number of bytes downloaded.
Returns Result object with success boolean and number of bytes downloaded .