Commit b077b6ea authored by Rajendra Kadam's avatar Rajendra Kadam

Read project min/max from existing min/max methods

parent 4680be77
...@@ -389,8 +389,8 @@ module Gitlab ...@@ -389,8 +389,8 @@ module Gitlab
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def container_expiration_policies_usage def container_expiration_policies_usage
results = {} results = {}
start = ::Project.minimum(:id) start = project_minimum_id
finish = ::Project.maximum(:id) finish = project_maximum_id
results[:projects_with_expiration_policy_disabled] = distinct_count(::ContainerExpirationPolicy.where(enabled: false), :project_id, start: start, finish: finish) results[:projects_with_expiration_policy_disabled] = distinct_count(::ContainerExpirationPolicy.where(enabled: false), :project_id, start: start, finish: finish)
# rubocop: disable UsageData/LargeTable # rubocop: disable UsageData/LargeTable
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment