Class: Gitlab::BackgroundMigration::BackfillProjectStatisticsStorageSizeWithoutPipelineArtifactsSizeJob::ProjectStatistics
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Gitlab::BackgroundMigration::BackfillProjectStatisticsStorageSizeWithoutPipelineArtifactsSizeJob::ProjectStatistics
show all
- Includes:
- EachBatch
- Defined in:
- lib/gitlab/background_migration/backfill_project_statistics_storage_size_without_pipeline_artifacts_size_job.rb
Constant Summary
ApplicationRecord::MAX_PLUCK
ResetOnUnionError::MAX_RESET_PERIOD
Instance Method Summary
collapse
cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order
#serializable_hash
Instance Method Details
#snippets_size ⇒ Object
37
38
39
|
# File 'lib/gitlab/background_migration/backfill_project_statistics_storage_size_without_pipeline_artifacts_size_job.rb', line 37
def snippets_size
super.to_i
end
|
#update_storage_size(storage_size_components) ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/gitlab/background_migration/backfill_project_statistics_storage_size_without_pipeline_artifacts_size_job.rb', line 20
def update_storage_size(storage_size_components)
new_storage_size = storage_size_components.sum { |component| method(component).call }
return unless storage_size != new_storage_size
self.storage_size = new_storage_size
save!
::Namespaces::ScheduleAggregationWorker.perform_async(project.namespace_id)
log_with_data('Scheduled Namespaces::ScheduleAggregationWorker')
end
|
#wiki_size ⇒ Object
33
34
35
|
# File 'lib/gitlab/background_migration/backfill_project_statistics_storage_size_without_pipeline_artifacts_size_job.rb', line 33
def wiki_size
super.to_i
end
|