diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /app/models/ci/job_artifact.rb | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'app/models/ci/job_artifact.rb')
-rw-r--r-- | app/models/ci/job_artifact.rb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/app/models/ci/job_artifact.rb b/app/models/ci/job_artifact.rb index 50e21a1c323..5248a80f710 100644 --- a/app/models/ci/job_artifact.rb +++ b/app/models/ci/job_artifact.rb @@ -261,6 +261,22 @@ module Ci self.where(project: project).sum(:size) end + ## + # FastDestroyAll concerns + # rubocop: disable CodeReuse/ServiceClass + def self.begin_fast_destroy + service = ::Ci::JobArtifacts::DestroyAssociationsService.new(self) + service.destroy_records + service + end + # rubocop: enable CodeReuse/ServiceClass + + ## + # FastDestroyAll concerns + def self.finalize_fast_destroy(service) + service.update_statistics + end + def local_store? [nil, ::JobArtifactUploader::Store::LOCAL].include?(self.file_store) end @@ -331,4 +347,4 @@ module Ci end end -Ci::JobArtifact.prepend_if_ee('EE::Ci::JobArtifact') +Ci::JobArtifact.prepend_mod_with('Ci::JobArtifact') |