Class: Gitlab::BackgroundMigration::MigrateLegacyArtifacts

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

Overview

The class to migrate job artifacts from `ci_builds` to `ci_job_artifacts`

Constant Summary collapse

FILE_LOCAL_STORE =

equal to ObjectStorage::Store::LOCAL

1
ARCHIVE_FILE_TYPE =
1
METADATA_FILE_TYPE =
2
LEGACY_PATH_FILE_LOCATION =
1

Instance Method Summary collapse

Instance Method Details

#perform(start_id, stop_id) ⇒ Object


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

def perform(start_id, stop_id)
  ActiveRecord::Base.transaction do
    insert_archives(start_id, stop_id)
    insert_metadatas(start_id, stop_id)
    delete_legacy_artifacts(start_id, stop_id)
  end
end