summaryrefslogtreecommitdiff
path: root/app/workers/expire_build_artifacts_worker.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-13 09:06:41 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-13 09:06:41 +0000
commit4f01ac5ba0bf72427ed4fef9b229d056dbb60e89 (patch)
tree55f2bfd319a18c05ac4e4401c7a0d7b13dd3d74f /app/workers/expire_build_artifacts_worker.rb
parent213ce7805856f2cc1d019a03c76ae0d098337c26 (diff)
downloadgitlab-ce-4f01ac5ba0bf72427ed4fef9b229d056dbb60e89.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers/expire_build_artifacts_worker.rb')
-rw-r--r--app/workers/expire_build_artifacts_worker.rb19
1 files changed, 0 insertions, 19 deletions
diff --git a/app/workers/expire_build_artifacts_worker.rb b/app/workers/expire_build_artifacts_worker.rb
index 9545227fa31..383fd30e098 100644
--- a/app/workers/expire_build_artifacts_worker.rb
+++ b/app/workers/expire_build_artifacts_worker.rb
@@ -7,25 +7,6 @@ class ExpireBuildArtifactsWorker
feature_category :continuous_integration
def perform
- if Feature.enabled?(:ci_new_expire_job_artifacts_service, default_enabled: true)
- perform_efficient_artifacts_removal
- else
- perform_legacy_artifacts_removal
- end
- end
-
- def perform_efficient_artifacts_removal
Ci::DestroyExpiredJobArtifactsService.new.execute
end
-
- # rubocop: disable CodeReuse/ActiveRecord
- def perform_legacy_artifacts_removal
- Rails.logger.info 'Scheduling removal of build artifacts' # rubocop:disable Gitlab/RailsLogger
-
- build_ids = Ci::Build.with_expired_artifacts.pluck(:id)
- build_ids = build_ids.map { |build_id| [build_id] }
-
- ExpireBuildInstanceArtifactsWorker.bulk_perform_async(build_ids)
- end
- # rubocop: enable CodeReuse/ActiveRecord
end