Class: Gitlab::BackgroundMigration::ResetTooManyTagsSkippedRegistryImports
- Inherits:
-
Object
- Object
- Gitlab::BackgroundMigration::ResetTooManyTagsSkippedRegistryImports
- Defined in:
- lib/gitlab/background_migration/reset_too_many_tags_skipped_registry_imports.rb
Overview
A job to reset container_repositories that were skipped in the phase 2 registry migration due to too many tags.
Defined Under Namespace
Classes: ContainerRepository
Instance Method Summary collapse
Instance Method Details
#perform(start_id, end_id) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/gitlab/background_migration/reset_too_many_tags_skipped_registry_imports.rb', line 16 def perform(start_id, end_id) ContainerRepository.base_query.where(id: start_id..end_id).each_batch(of: 100) do |sub_batch| sub_batch.update_all( migration_pre_import_started_at: nil, migration_pre_import_done_at: nil, migration_import_started_at: nil, migration_import_done_at: nil, migration_aborted_at: nil, migration_skipped_at: nil, migration_retries_count: 0, migration_skipped_reason: nil, migration_state: 'default', migration_aborted_in_state: nil ) end mark_job_as_succeeded(start_id, end_id) end |