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:
authorDJ Mountney <david@twkie.net>2017-06-28 07:50:23 +0300
committerDJ Mountney <david@twkie.net>2017-06-28 07:50:23 +0300
commit353af927d2cb8394a93c57dcaead0d0f14b4e746 (patch)
tree3a2a2e09c23a94b83f5102e7a432a2577767b21f /lib/gitlab/current_settings.rb
parent604db40bbe8dfcef846360e459345313dfd4020b (diff)
Add additional error caching for redis when using a tcp address to
connect instead of a socket This helps with compiling gitlab assets without a redis server (used during omnibus build)
Diffstat (limited to 'lib/gitlab/current_settings.rb')
-rw-r--r--lib/gitlab/current_settings.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb
index 818b3d9c46b..7f1932da3b7 100644
--- a/lib/gitlab/current_settings.rb
+++ b/lib/gitlab/current_settings.rb
@@ -25,7 +25,7 @@ module Gitlab
def cached_application_settings
begin
::ApplicationSetting.cached
- rescue ::Redis::BaseError, ::Errno::ENOENT
+ rescue ::Redis::BaseError, ::Errno::ENOENT, ::Errno::EADDRNOTAVAIL
# In case Redis isn't running or the Redis UNIX socket file is not available
end
end
@@ -36,7 +36,7 @@ module Gitlab
# This loads from the database into the cache, so handle Redis errors
begin
db_settings = ::ApplicationSetting.current
- rescue ::Redis::BaseError, ::Errno::ENOENT
+ rescue ::Redis::BaseError, ::Errno::ENOENT, ::Errno::EADDRNOTAVAIL
# In case Redis isn't running or the Redis UNIX socket file is not available
end