Class: Gitlab::BackgroundMigration::MoveCiBuildsMetadata::EnvConfig
- Inherits:
-
Object
- Object
- Gitlab::BackgroundMigration::MoveCiBuildsMetadata::EnvConfig
- Defined in:
- lib/gitlab/background_migration/move_ci_builds_metadata.rb
Overview
We know that there are installations with years of data that they might not want to migrate so we provide a few switches here to skip old data. The background migrations are executed in Sidekiq, so these should be set as ENV variables on nodes that execute the Sidekiq jobs and Sidekiq must be restarted after they are changed. There should be a line in log/application_json.log showing what values are used.
Instance Attribute Summary collapse
-
#migration_cutoff ⇒ Object
readonly
Returns the value of attribute migration_cutoff.
-
#processing_data_cutoff ⇒ Object
readonly
Returns the value of attribute processing_data_cutoff.
Instance Method Summary collapse
-
#initialize ⇒ EnvConfig
constructor
A new instance of EnvConfig.
Constructor Details
#initialize ⇒ EnvConfig
Returns a new instance of EnvConfig.
92 93 94 95 96 97 |
# File 'lib/gitlab/background_migration/move_ci_builds_metadata.rb', line 92 def initialize @migration_cutoff = ('GITLAB_DB_CI_JOBS_MIGRATION_CUTOFF') @processing_data_cutoff = ('GITLAB_DB_CI_JOBS_PROCESSING_DATA_CUTOFF') @processing_data_cutoff ||= processing_data_cutoff_from_db&.seconds&.ago @processing_data_cutoff ||= @migration_cutoff end |
Instance Attribute Details
#migration_cutoff ⇒ Object (readonly)
Returns the value of attribute migration_cutoff.
90 91 92 |
# File 'lib/gitlab/background_migration/move_ci_builds_metadata.rb', line 90 def migration_cutoff @migration_cutoff end |
#processing_data_cutoff ⇒ Object (readonly)
Returns the value of attribute processing_data_cutoff.
90 91 92 |
# File 'lib/gitlab/background_migration/move_ci_builds_metadata.rb', line 90 def processing_data_cutoff @processing_data_cutoff end |