Commit 353af927 authored by DJ Mountney's avatar DJ Mountney

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)
parent 604db40b
......@@ -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
......
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