Commit 4511cb70 authored by Dylan Griffith's avatar Dylan Griffith

Merge branch 'bvl-elasticsearch-throttled-queues' into 'master'

Throttle some elasticsearch queues

See merge request gitlab-org/gitlab!27432
parents 68e796e3 e9fe8629
......@@ -27,7 +27,7 @@
- :name: cronjob:elastic_index_bulk_cron
:feature_category: :global_search
:has_external_dependencies:
:urgency: :low
:urgency: :throttled
:resource_boundary: :unknown
:weight: 1
:idempotent: true
......@@ -482,7 +482,7 @@
- :name: elastic_commit_indexer
:feature_category: :global_search
:has_external_dependencies:
:urgency: :low
:urgency: :throttled
:resource_boundary: :unknown
:weight: 1
:idempotent:
......@@ -496,7 +496,7 @@
- :name: elastic_indexer
:feature_category: :global_search
:has_external_dependencies:
:urgency: :low
:urgency: :throttled
:resource_boundary: :unknown
:weight: 1
:idempotent:
......
......@@ -5,6 +5,7 @@ class ElasticCommitIndexerWorker # rubocop:disable Scalability/IdempotentWorker
feature_category :global_search
sidekiq_options retry: 2
urgency :throttled
def perform(project_id, oldrev = nil, newrev = nil, wiki = false)
return true unless Gitlab::CurrentSettings.elasticsearch_indexing?
......
......@@ -10,6 +10,7 @@ class ElasticIndexBulkCronWorker
feature_category :global_search
idempotent!
urgency :throttled
def perform
in_lock(self.class.name.underscore, ttl: 10.minutes, retries: 10, sleep_sec: 1) do
......
......@@ -6,6 +6,7 @@ class ElasticIndexerWorker # rubocop:disable Scalability/IdempotentWorker
sidekiq_options retry: 2
feature_category :global_search
urgency :throttled
def perform(operation, class_name, record_id, es_id, options = {})
return true unless Gitlab::CurrentSettings.elasticsearch_indexing?
......
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