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>2021-05-19 18:44:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /app/workers/build_hooks_worker.rb
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'app/workers/build_hooks_worker.rb')
-rw-r--r--app/workers/build_hooks_worker.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/workers/build_hooks_worker.rb b/app/workers/build_hooks_worker.rb
index 5e05063f058..be79d6b2afb 100644
--- a/app/workers/build_hooks_worker.rb
+++ b/app/workers/build_hooks_worker.rb
@@ -2,6 +2,8 @@
class BuildHooksWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
+
+ sidekiq_options retry: 3
include PipelineQueue
queue_namespace :pipeline_hooks
@@ -9,6 +11,16 @@ class BuildHooksWorker # rubocop:disable Scalability/IdempotentWorker
urgency :high
data_consistency :delayed, feature_flag: :load_balancing_for_build_hooks_worker
+ DATA_CONSISTENCY_DELAY = 3
+
+ def self.perform_async(*args)
+ if Feature.enabled?(:delayed_perform_for_build_hooks_worker, default_enabled: :yaml)
+ perform_in(DATA_CONSISTENCY_DELAY.seconds, *args)
+ else
+ super
+ end
+ end
+
# rubocop: disable CodeReuse/ActiveRecord
def perform(build_id)
Ci::Build.includes({ runner: :tags })