diff options
author | DJ Mountney <david@twkie.net> | 2017-06-28 07:50:23 +0300 |
---|---|---|
committer | DJ Mountney <david@twkie.net> | 2017-07-07 19:32:33 +0300 |
commit | 4bad8ca853fdb7eb3443867266ed586492ba62e5 (patch) | |
tree | 4f03cb53f861f591d418713d6394920165a02353 | |
parent | a4828bca04add758d054ae1739d0d937631b37da (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)
-rw-r--r-- | lib/gitlab/current_settings.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb index 284e6ad55a5..aa7460b914a 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 |