summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2016-09-30 12:27:43 +0200
committerJacob Vosmaer <jacob@gitlab.com>2016-09-30 12:27:43 +0200
commit52ee85e7bf35d372285d70cc93016854774839b1 (patch)
treeb18aa064138d2762834c267f20dd4d295660983f /config
parent7d48778c4f35e61fd3e6e9bfbb476c27f9fb4602 (diff)
downloadgitlab-ce-52ee85e7bf35d372285d70cc93016854774839b1.tar.gz
Initialize Redis pool in single-threaded context
This side-steps the need for mutexes and whatnot.
Diffstat (limited to 'config')
-rw-r--r--config/initializers/7_redis.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/config/initializers/7_redis.rb b/config/initializers/7_redis.rb
new file mode 100644
index 00000000000..ae2ca258df1
--- /dev/null
+++ b/config/initializers/7_redis.rb
@@ -0,0 +1,3 @@
+# Make sure we initialize a Redis connection pool before Sidekiq starts
+# multi-threaded execution.
+Gitlab::Redis.with { nil }