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:
Diffstat (limited to 'lib/gitlab/redis/multi_store.rb')
-rw-r--r--lib/gitlab/redis/multi_store.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/gitlab/redis/multi_store.rb b/lib/gitlab/redis/multi_store.rb
index 9ce030c0bbe..bbe5a8add4b 100644
--- a/lib/gitlab/redis/multi_store.rb
+++ b/lib/gitlab/redis/multi_store.rb
@@ -248,6 +248,19 @@ module Gitlab
end
end
+ # connection_pool gem calls `#close` method:
+ #
+ # https://github.com/mperham/connection_pool/blob/v2.4.1/lib/connection_pool.rb#L63
+ #
+ # Let's define it explicitly instead of propagating it to method_missing
+ def close
+ if use_primary_and_secondary_stores?
+ [primary_store, secondary_store].map(&:close).first
+ else
+ default_store.close
+ end
+ end
+
private
# @return [Boolean]