Commit 89ae21d0 authored by drew cimino's avatar drew cimino

Add ci_destroy_all_expired_service feature flag

Add an extra flag to completely shut off the worker, so we can
effectively turn off artifact expiration quickly and without any
infra configuration changes.
parent 48a77e0f
......@@ -26,6 +26,8 @@ module Ci
# preventing multiple `ExpireBuildArtifactsWorker` CRON jobs run concurrently,
# which is scheduled every 7 minutes.
def execute
return 0 unless ::Feature.enabled?(:ci_destroy_all_expired_service, default_enabled: :yaml)
in_lock(EXCLUSIVE_LOCK_KEY, ttl: LOCK_TIMEOUT, retries: 1) do
if ::Feature.enabled?(:ci_destroy_unlocked_job_artifacts)
destroy_unlocked_job_artifacts
......
---
name: ci_destroy_all_expired_service
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/76504
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/348786
milestone: '14.6'
type: development
group: group::pipeline execution
default_enabled: false
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment