Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-01-13 18:14:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-01-13 18:14:46 +0300
commitbd5ff5cb6553dd8f168b28c97175a63250fe2ab2 (patch)
treec51bd4b3144c48e43d2109e589b339d710e929c7 /app/workers/ci
parenta00537e412e4ef6761ad35cc7148637ad75434a1 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers/ci')
-rw-r--r--app/workers/ci/job_artifacts/expire_project_build_artifacts_worker.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/app/workers/ci/job_artifacts/expire_project_build_artifacts_worker.rb b/app/workers/ci/job_artifacts/expire_project_build_artifacts_worker.rb
new file mode 100644
index 00000000000..299b9bbe3d3
--- /dev/null
+++ b/app/workers/ci/job_artifacts/expire_project_build_artifacts_worker.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+module Ci
+ module JobArtifacts
+ class ExpireProjectBuildArtifactsWorker
+ include ApplicationWorker
+
+ data_consistency :always
+
+ feature_category :build_artifacts
+ idempotent!
+
+ def perform(project_id)
+ return unless Project.id_in(project_id).exists?
+
+ ExpireProjectBuildArtifactsService.new(project_id, Time.current).execute
+ end
+ end
+ end
+end