Commit 439545c8 authored by Fabio Pitino's avatar Fabio Pitino Committed by Stan Hu

Use select(:id) to save memory on query

parent 49ee7828
......@@ -18,7 +18,7 @@ class ClearSharedRunnersMinutesWorker
namespaces.update_all(last_ci_minutes_notification_at: nil, last_ci_minutes_usage_notification_level: nil)
end
Namespace.each_batch do |namespaces|
Namespace.select(:id).each_batch do |namespaces|
Namespace.transaction do
reset_statistics(NamespaceStatistics, namespaces)
reset_statistics(ProjectStatistics, namespaces)
......
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