diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/enumerable.rb | 26 | ||||
-rw-r--r-- | lib/mastodon/redis_config.rb | 1 |
2 files changed, 1 insertions, 26 deletions
diff --git a/lib/enumerable.rb b/lib/enumerable.rb deleted file mode 100644 index 66918f65e..000000000 --- a/lib/enumerable.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -module Enumerable - # TODO: Remove this once stop to support Ruby 2.6 - if RUBY_VERSION < '2.7.0' - def filter_map - if block_given? - result = [] - each do |element| - res = yield element - result << res if res - end - result - else - Enumerator.new do |yielder| - result = [] - each do |element| - res = yielder.yield element - result << res if res - end - result - end - end - end - end -end diff --git a/lib/mastodon/redis_config.rb b/lib/mastodon/redis_config.rb index 98dc4788d..3522fa11e 100644 --- a/lib/mastodon/redis_config.rb +++ b/lib/mastodon/redis_config.rb @@ -37,6 +37,7 @@ REDIS_CACHE_PARAMS = { namespace: cache_namespace, pool_size: Sidekiq.server? ? Sidekiq.options[:concurrency] : Integer(ENV['MAX_THREADS'] || 5), pool_timeout: 5, + connect_timeout: 5, }.freeze REDIS_SIDEKIQ_PARAMS = { |