summaryrefslogtreecommitdiff
path: root/app/workers/container_expiration_policies/cleanup_container_repository_worker.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-05-19 07:33:21 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-19 07:33:21 +0000
commit36a59d088eca61b834191dacea009677a96c052f (patch)
treee4f33972dab5d8ef79e3944a9f403035fceea43f /app/workers/container_expiration_policies/cleanup_container_repository_worker.rb
parenta1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff)
downloadgitlab-ce-36a59d088eca61b834191dacea009677a96c052f.tar.gz
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'app/workers/container_expiration_policies/cleanup_container_repository_worker.rb')
-rw-r--r--app/workers/container_expiration_policies/cleanup_container_repository_worker.rb7
1 files changed, 0 insertions, 7 deletions
diff --git a/app/workers/container_expiration_policies/cleanup_container_repository_worker.rb b/app/workers/container_expiration_policies/cleanup_container_repository_worker.rb
index cd3ed5d4c9b..f40855a7455 100644
--- a/app/workers/container_expiration_policies/cleanup_container_repository_worker.rb
+++ b/app/workers/container_expiration_policies/cleanup_container_repository_worker.rb
@@ -27,7 +27,6 @@ module ContainerExpirationPolicies
].freeze
def perform_work
- return unless throttling_enabled?
return unless container_repository
log_extra_metadata_on_done(:container_repository_id, container_repository.id)
@@ -45,8 +44,6 @@ module ContainerExpirationPolicies
end
def max_running_jobs
- return 0 unless throttling_enabled?
-
::Gitlab::CurrentSettings.container_registry_expiration_policies_worker_capacity
end
@@ -122,10 +119,6 @@ module ContainerExpirationPolicies
policy.next_run_at < now || (now + max_cleanup_execution_time.seconds < policy.next_run_at)
end
- def throttling_enabled?
- Feature.enabled?(:container_registry_expiration_policies_throttling, default_enabled: :yaml)
- end
-
def max_cleanup_execution_time
::Gitlab::CurrentSettings.container_registry_delete_tags_service_timeout
end