diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-17 13:07:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-17 13:07:47 +0300 |
commit | d670c3006e6e44901bce0d53cc4768d1d80ffa92 (patch) | |
tree | 8f65743c232e5b76850c4cc264ba15e1185815ff /app/workers | |
parent | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-ee
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/container_expiration_policy_worker.rb | 8 | ||||
-rw-r--r-- | app/workers/web_hook_worker.rb | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/app/workers/container_expiration_policy_worker.rb b/app/workers/container_expiration_policy_worker.rb index b15d1bf90bd..8fc139ac87c 100644 --- a/app/workers/container_expiration_policy_worker.rb +++ b/app/workers/container_expiration_policy_worker.rb @@ -15,11 +15,19 @@ class ContainerExpirationPolicyWorker # rubocop:disable Scalability/IdempotentWo def perform process_stale_ongoing_cleanups + disable_policies_without_container_repositories throttling_enabled? ? perform_throttled : perform_unthrottled end private + def disable_policies_without_container_repositories + ContainerExpirationPolicy.active.each_batch(of: BATCH_SIZE) do |policies| + policies.without_container_repositories + .update_all(enabled: false) + end + end + def process_stale_ongoing_cleanups threshold = delete_tags_service_timeout.seconds + 30.minutes ContainerRepository.with_stale_ongoing_cleanup(threshold.ago) diff --git a/app/workers/web_hook_worker.rb b/app/workers/web_hook_worker.rb index 3480f49d640..a2a53ca922a 100644 --- a/app/workers/web_hook_worker.rb +++ b/app/workers/web_hook_worker.rb @@ -8,7 +8,7 @@ class WebHookWorker feature_category :integrations worker_has_external_dependencies! loggable_arguments 2 - data_consistency :delayed, feature_flag: :load_balancing_for_web_hook_worker + data_consistency :delayed sidekiq_options retry: 4, dead: false |