Class: Gitlab::BackgroundMigration::BackfillSnippetRepositories

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/background_migration/backfill_snippet_repositories.rb

Overview

Class that will fill the project_repositories table for projects that are on hashed storage and an entry is missing in this table.

Constant Summary collapse

MAX_RETRIES =
2

Instance Method Summary collapse

Instance Method Details

#perform(start_id, stop_id) ⇒ Object


10
11
12
13
14
# File 'lib/gitlab/background_migration/backfill_snippet_repositories.rb', line 10

def perform(start_id, stop_id)
  snippets = snippet_relation.where(id: start_id..stop_id)

  migrate_snippets(snippets)
end

#perform_by_ids(snippet_ids) ⇒ Object


16
17
18
19
20
# File 'lib/gitlab/background_migration/backfill_snippet_repositories.rb', line 16

def perform_by_ids(snippet_ids)
  snippets = snippet_relation.where(id: snippet_ids)

  migrate_snippets(snippets)
end