X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/22c8b6367a9cd79b17240b7dca1ac8f7d8e7ee77..657235e9e2b90c837efe809fc014fe6fe0cb9b23:/services/api/app/controllers/application_controller.rb diff --git a/services/api/app/controllers/application_controller.rb b/services/api/app/controllers/application_controller.rb index 1c8450bfdc..e91e3ce03e 100644 --- a/services/api/app/controllers/application_controller.rb +++ b/services/api/app/controllers/application_controller.rb @@ -306,7 +306,7 @@ class ApplicationController < ActionController::Base limit_columns.map { |s| "octet_length(#{s})" }.join(" + ")) new_limit = 0 read_total = 0 - limit_query.find_each do |record| + limit_query.each do |record| new_limit += 1 read_total += record.read_length.to_i if read_total >= Rails.configuration.max_index_database_read