Class: Gitlab::BackgroundMigration::PopulatePersonalSnippetStatistics
- Inherits:
-
Object
- Object
- Gitlab::BackgroundMigration::PopulatePersonalSnippetStatistics
- Defined in:
- lib/gitlab/background_migration/populate_personal_snippet_statistics.rb
Overview
This class creates/updates those personal snippets statistics that haven't been created nor initialized. It also updates the related root storage namespace stats
Instance Method Summary collapse
Instance Method Details
#perform(snippet_ids) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/gitlab/background_migration/populate_personal_snippet_statistics.rb', line 9 def perform(snippet_ids) personal_snippets(snippet_ids).group_by(&:author).each do |, | upsert_snippet_statistics() update_namespace_statistics(.namespace) end end |