summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-07-01 12:51:21 -0700
committerStan Hu <stanhu@gmail.com>2016-07-25 17:59:09 -0700
commitf4aac773894bb17f550fff8ee548f2a18cd18b64 (patch)
tree14a44f8db624e6486318a387ddfbf9ee8cc9ce91 /config
parent68162ba900f1b9003fa3d07613333f201be8154a (diff)
downloadgitlab-ce-f4aac773894bb17f550fff8ee548f2a18cd18b64.tar.gz
Add support for using RequestStore within Sidekiq tasks via SIDEKIQ_REQUEST_STORE env variable
This significantly reduces the DB churn in the PostReceive task when it performs reference extraction. See #18663
Diffstat (limited to 'config')
-rw-r--r--config/initializers/sidekiq.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb
index 5e839327e7a..48b6075ba78 100644
--- a/config/initializers/sidekiq.rb
+++ b/config/initializers/sidekiq.rb
@@ -7,6 +7,7 @@ Sidekiq.configure_server do |config|
config.server_middleware do |chain|
chain.add Gitlab::SidekiqMiddleware::ArgumentsLogger if ENV['SIDEKIQ_LOG_ARGUMENTS']
chain.add Gitlab::SidekiqMiddleware::MemoryKiller if ENV['SIDEKIQ_MEMORY_KILLER_MAX_RSS']
+ chain.add Gitlab::SidekiqMiddleware::RequestStoreMiddleware if ENV['SIDEKIQ_REQUEST_STORE']
end
# Sidekiq-cron: load recurring jobs from gitlab.yml