Add retention policy for cached content and media (#19232)
This commit is contained in:
parent
3e0999cd11
commit
5c9abdeff1
30 changed files with 559 additions and 135 deletions
|
@ -7,9 +7,7 @@ class RedisConfiguration
|
|||
@pool = ConnectionPool.new(size: new_pool_size) { new.connection }
|
||||
end
|
||||
|
||||
def with
|
||||
pool.with { |redis| yield redis }
|
||||
end
|
||||
delegate :with, to: :pool
|
||||
|
||||
def pool
|
||||
@pool ||= establish_pool(pool_size)
|
||||
|
@ -17,7 +15,7 @@ class RedisConfiguration
|
|||
|
||||
def pool_size
|
||||
if Sidekiq.server?
|
||||
Sidekiq.options[:concurrency]
|
||||
Sidekiq[:concurrency]
|
||||
else
|
||||
ENV['MAX_THREADS'] || 5
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue